Open xqwzts opened 10 years ago
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.
We could also try the domain module, as @mephux suggested.
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.