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 in transition handlers are swallowed #21
Comments
well.. the rule is quite simple - promises should always be returned here many promises are being created in a loop, but only the last one is getting returned replace with smth like return when.map(reversedArray(matches), function () {
... make your promise ...
return promise;
}); |
I'd also suggest using bluebird promise library which logs uncaught errors in browser console. |
Or when. |
"just do promises right" :P Anyway, not actually interested in a promise conversation (I was just bugging Michael about them before this commit, talking about how people always mess them up and then app code errors get swallowed, so it was fun for me to come back and say "see ... pain in the neck"). I have two requirements though:
I do not want to constantly be having promise conversations with people using this library. |
I'll take a look at this today. @rpflorence I agree that the last thing I want is to have endless conversations with people trying to track down swallowed errors, so we'll just fix it and not swallow them. If we can't, we'll remove support for them. |
BTW, I'd be happy to discuss support for callbacks in transition hooks in a separate issue. Promises give us guarantees that callbacks don't, and they present a really clean interface for dealing with asynchronous code. @andreypopp I used |
I hate promises ... can we not use promises?
The text was updated successfully, but these errors were encountered: