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

Errors thrown in listeneners (onSomeActionCompleted, for eg) fail silently. #17

Open
ponelat opened this issue Mar 17, 2016 · 3 comments

Comments

@ponelat
Copy link

ponelat commented Mar 17, 2016

This is not ideal.
I understand it was an irritation when failed actions propagated to the console as errors. But I feel this is worse.

if I have ....

onSomeActionCompleted() {
   throw new Error("hello?")
}

execution just stops. No errors appear in the console.

Is there perhaps a way to configure reflux ( or reflux-promise ) to handle the promise in a more explicit manner?

@askot
Copy link

askot commented Mar 17, 2016

+1. I am having exactly the same issue.

// Ensure that the promise does trigger "Uncaught (in promise)" errors in console if no error handler is added // See: https://github.com/reflux/reflux-promise/issues/4 createdPromise.catch(function() {});

Traced it down to empty catch handler reflux-promise. Basically exceptions are just catched and silently ignored. It would helpful to support adding custom catch function, and not fail silently by default.

@askot
Copy link

askot commented Mar 18, 2016

The PR #18 would fix it for my use case. If you wanted to silently ignore all unhandled exceptions, you could do that, or you can choose to not to provide the catch handling function at all.

@devinivy
Copy link
Contributor

@askot thanks– as I commented on the PR, I think this is the right idea 👍

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

No branches or pull requests

3 participants