Skip to content
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

Archive Manager’s EventEmitter swallows errors #169

Closed
sallar opened this issue Jul 5, 2017 · 1 comment
Closed

Archive Manager’s EventEmitter swallows errors #169

sallar opened this issue Jul 5, 2017 · 1 comment

Comments

@sallar
Copy link
Member

sallar commented Jul 5, 2017

When using the Archive Manager's events like so:

archiveManager.on('sourceAdded', function __handleNewSource(sourceInfo) {
  // do something with "sourceInfo"
});

if something throws an error inside the callback function __handleNewSource, the error will be handled by buttercup-core and the application crashed without a meaningful error.

The EventEmitter callback should not break the buttercup-core. Or am I doing something wrong...?

@perry-mitchell
Copy link
Member

Yep this looks dodgy. Will change it to async as per our discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants