Skip to content
This repository was archived by the owner on Feb 18, 2021. It is now read-only.

Show toast on data source error#132

Merged
morsh merged 2 commits intoAzure:ibex-version-1.0from
c-w:bugfix-83
May 21, 2017
Merged

Show toast on data source error#132
morsh merged 2 commits intoAzure:ibex-version-1.0from
c-w:bugfix-83

Conversation

@c-w
Copy link
Contributor

@c-w c-w commented May 17, 2017

Fixes #83

Example error displayed when the connection to the data-source failed:

image

@c-w c-w changed the base branch from master to ibex-version-1.0 May 17, 2017 19:43
Copy link
Contributor

@morsh morsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just this small fix, and I can merge this.
Very cool you took this on

private errorToMessage(error: any): string {
const exception = error as Error;
if (exception == null) {
return error;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not:
return exception;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was actually a misunderstanding on my part how as works in TypeScript. I assumed that it worked like in C# (try a cast and if it's not castable, return null). Fixed in 5961bc7 by using instanceof.

@morsh morsh merged commit 29ec245 into Azure:ibex-version-1.0 May 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants