New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EventEmitter2 is not handling throw exception and closing app #298
Comments
Same issue here. But it seems to be possible to |
same here. Could you please show me an example of how you manage to make it work with |
Basically just doing a try {
ee.emit("some.other.event");
} catch {
console.log("catched!");
}
// Output: Error: blah
try {
await ee.emitAsync("some.other.event");
} catch {
console.log("catched!");
}
// Output: catched! |
Oh, I have realized some tests here and identified that this problem only occours because the callback for |
My expectation is that if an error is thrown within an event listener it should be handled by EE2 and app will not be closed . or we will be able to handle using try catch ? So it is not the case here.
In EE node:events they use 'error' handler for this case
old ee examples:
The text was updated successfully, but these errors were encountered: