Archive for May, 2017

Bookmarks from PinBoard May 20, 2017

May 20th, 2017

Bookmarks I’ve added on PinBoard.in recently

Digest powered by RSS Digest

Bookmarks from PinBoard May 13, 2017

May 13th, 2017

Bookmarks I’ve added on PinBoard.in recently

Digest powered by RSS Digest

NodeJS : UnhandledPromiseRejection handling

May 11th, 2017

Are you programming Node JS Javascript and reached the dreaded:

(node:1984) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): xxxxx
(node:1984) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

but can’t figure out where the Promise is in NodeJS which is causing this? Just add the following bit of code near the top of your code (after the requires if used) which might help:

process.on('unhandledRejection', function(reason,promise) {
console.log('unhandledRejection', reason);
});

Bookmarks from PinBoard May 6, 2017

May 6th, 2017

Bookmarks I’ve added on PinBoard.in recently

Digest powered by RSS Digest

gamy-dance
%d bloggers like this: