komanda icon indicating copy to clipboard operation
komanda copied to clipboard

Handle uncaught exceptions

Open xqwzts opened this issue 10 years ago • 2 comments

Instead of displaying the node stacktrace when an uncaught exception is thrown, handle all uncaught exceptions and display an error message to the user.

We can listen to the uncaughtException event and fail gracefully if it is emitted.

xqwzts avatar Jun 27 '14 00:06 xqwzts

This can be good and bad at the same time. When we expect something to happen, we wont really know if it did with a simple console log. Maybe a modal or pop-up will be better to let the user know something has gone wrong. But yeah, this should be better than the entire thing crashing and having to start up again.

AlexKvazos avatar Jun 27 '14 03:06 AlexKvazos

We could also try the domain module, as @mephux suggested.

eugene-bulkin avatar Jun 27 '14 22:06 eugene-bulkin