News for hackers. Stuff that matters.
Re:Side Effects vs. Promises by greggman on Sunday October 04, 2015 @02:00PM (#10328203)
Since we're talking about promises ... can anyone point to some good patterns for nested promises and not losing errors to the either?

Every time I use promises I find that I lose errors and it takes hours of adding console.logs all over the place until I find the place with the error some nested promise is hiding.

Re:Side Effects vs. Promises by inglor on Sunday October 04, 2015 @02:04PM (#10328223)
Hey! In NodeJS we added a handler that helps you with that here: https://nodejs.org/api/process.html#process_event_unhandledr...

Here is a talk I gave about adding it last June: https://www.youtube.com/watch?v=LGpmUyFnyuQ

Personally, I recommend you use a faster richer userland library like Bluebird which has stronger unhandled rejection tracking.

Re:Side Effects vs. Promises by Too on Sunday October 04, 2015 @02:06PM (#10328236)
Chromes "break on exception"-option also breaks on unhandled promise reject().