Advertisement
Guest User

Untitled

a guest
Oct 8th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var errbacksStringsAsync = Promise.promisify(function(cb){
  2.     setTimeout(function(){
  3.         cb("Where is your stack now?");
  4.     }, 13);
  5. });
  6.  
  7. errbacksStringsAsync().catch(function(e){
  8.     console.error(e.stack)
  9. });
  10.  
  11.  
  12. ## Gives good stack:
  13.  
  14. Error: Where is your stack now?
  15.     at maybeWrapAsError (c:\Users\Petka Antonov\bluebird\js\bluebird_debug.js:148:12)
  16.     at null._onTimeout (c:\Users\Petka Antonov\bluebird\test\mocha\promisify.js:61:9)
  17.     at Timer.listOnTimeout (timers.js:107:15)
  18. From previous event:
  19.     at Context.<anonymous> (c:\Users\Petka Antonov\bluebird\test\mocha\promisify.js:380:13)
  20.     at Test.Runnable.run (c:\Users\Petka Antonov\bluebird\node_modules\mocha\lib\runnable.js:194:15)
  21.     at Runner.runTest (c:\Users\Petka Antonov\bluebird\node_modules\mocha\lib\runner.js:355:10)
  22.     at c:\Users\Petka Antonov\bluebird\node_modules\mocha\lib\runner.js:401:12
  23.     at next (c:\Users\Petka Antonov\bluebird\node_modules\mocha\lib\runner.js:281:14)
  24.     at c:\Users\Petka Antonov\bluebird\node_modules\mocha\lib\runner.js:290:7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement