Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Correctly catch Promise exception when trying to open browser #1372

Merged
merged 1 commit into from
Dec 4, 2017
Merged

Correctly catch Promise exception when trying to open browser #1372

merged 1 commit into from
Dec 4, 2017

Conversation

rpoddighe
Copy link
Contributor

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Bug fix

  • What is the current behavior? (You can also link to an open issue here)
    UnhandledPromiseRejectionWarning when automatically opening UI in browser fails

  • What is the new behavior (if this is a feature change)?
    Promise rejction is handled and a an error message is printed.

  • Other information:
    For some reason the opn module fails to open my browser, and try/catch doesn't catch the error since opn() returns a Promise. Just wanted to point that out, feel free to change the console statement to your taste :)

@askmike
Copy link
Owner

askmike commented Dec 4, 2017

Ah very nice one, thanks!

@askmike askmike merged commit 721067f into askmike:develop Dec 4, 2017
@askmike askmike mentioned this pull request Dec 11, 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