-
Notifications
You must be signed in to change notification settings - Fork 102
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
Exception swallowed in Task #163
Comments
Mmh, I'm confused about that PR. The tests pass when fixing the check in the In any case, Task shouldn't be swallowing any errors, but it's quite possible that some weird interaction between Task and Promises is doing that. Hard to say what without more context though. |
The conditional assertion was confusing indeed. I've hopefully clarified the intent now with the updated PR description. |
I encountered a similar problem if I try to use No matter if I use const t = task(resolver =>
jwt.sign(payload, secret, (err, _) =>
err ? resolver.reject() : resolver.resolve()
)
await t
.map(_ => { throw new Error('abc') })
.run()
.promise() will swallow the error and hang there. So far, haven't encounter any problem neither if I use the synchronized version: Oh and if I
node: 9.3.0 Hope this helps... edit: Just tried with |
When using a
require()
d missing import, which should be undefined, inside aTask
the exception is swallowed.Steps to reproduce
See upcoming test.
Expected behaviour
An exception to be raised
Observed behaviour
The program doesn't raise an exception or not even an unhandledRejection.
Environment
The text was updated successfully, but these errors were encountered: