You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I have some unexpected behavior with thrown errors: when I throw an error from inside of action function, it's silenced somehow when the rejection is not caught.
Here's the simplified example:
constPromise=require('bluebird');constpromiseDoWhilst=require('promise-do-whilst');foo().then(result=>console.log('Result',result));// Error is displayed in the console.bar().then(result=>console.log('Result',result));// Error is ignored, no output.functionfoo(){returnPromise.resolve().then(()=>{thrownewError('Some error');});}functionbar(){returnpromiseDoWhilst(()=>{thrownewError('Some error');},()=>true);}
I do prefer to see all thrown errors in the output of the Node.js application.
Thanks!
The text was updated successfully, but these errors were encountered:
I believe node v6+ processes unhandled promise exceptions in the manner you were expecting. Otherwise, as you noted, indeed the expectation is to provide a catch handler if you wish.
Hello!
Thank you for this great module!
However, I have some unexpected behavior with thrown errors: when I throw an error from inside of
action
function, it's silenced somehow when the rejection is not caught.Here's the simplified example:
I do prefer to see all thrown errors in the output of the Node.js application.
Thanks!
The text was updated successfully, but these errors were encountered: