kraken-js
kraken-js copied to clipboard
bluebird is error-handing our error-handler
Need to look into this some more but bluebird assumes endgame isn't there to catch the uncaught exception on app emitting error. Eats it up, prevents the app from tearing down.
I think I ran into this as well.. I introduced an error into the onconfig handler and got this output:
[development] Listening on http://localhost:8000
Possibly unhandled Error: boom
at onconfig (/Users/medelman/src/krakex/kraken-example-with-passport/lib/spec.js:29:18)
at promisified (eval at makeNodePromisifiedEval (/Users/medelman/src/krakex/kraken-example-with-passport/node_modules/kraken-js/node_modules/bluebird/js/main/promisify.js:198:12), <anonymous>:3:213)
at tryCatch1 (/Users/medelman/src/krakex/kraken-example-with-passport/node_modules/kraken-js/node_modules/bluebird/js/main/util.js:63:19)
at Promise$_callHandler [as _callHandler] (/Users/medelman/src/krakex/kraken-example-with-passport/node_modules/kraken-js/node_modules/bluebird/js/main/promise.js:695:13)
at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/Users/medelman/src/krakex/kraken-example-with-passport/node_modules/kraken-js/node_modules/bluebird/js/main/promise.js:711:18)
at Promise$_settlePromiseAt [as _settlePromiseAt] (/Users/medelman/src/krakex/kraken-example-with-passport/node_modules/kraken-js/node_modules/bluebird/js/main/promise.js:868:14)
at Promise$_settlePromises [as _settlePromises] (/Users/medelman/src/krakex/kraken-example-with-passport/node_modules/kraken-js/node_modules/bluebird/js/main/promise.js:1006:14)
at Async$_consumeFunctionBuffer [as _consumeFunctionBuffer] (/Users/medelman/src/krakex/kraken-example-with-passport/node_modules/kraken-js/node_modules/bluebird/js/main/async.js:74:12)
at Async$consumeFunctionBuffer (/Users/medelman/src/krakex/kraken-example-with-passport/node_modules/kraken-js/node_modules/bluebird/js/main/async.js:37:14)
at process._tickCallback (node.js:355:11)
I would have assumed a process.exit on throwing that error ^
Doing some research with errors in kraken right now and remembering this one. Shouldn't it force a crash here?