Skip to content
This repository has been archived by the owner. It is now read-only.

Show toast on data source error #132

Merged
merged 2 commits into from May 21, 2017
Merged

Show toast on data source error #132

merged 2 commits into from May 21, 2017

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
Copy link
Contributor

@morsh morsh left a comment

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

@morsh morsh May 18, 2017

why not:
return exception;

Copy link
Contributor Author

@c-w c-w May 18, 2017

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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants