Skip to content

Instantly share code, notes, and snippets.

View geekingfrog's full-sized avatar
💭
🐸

Grégoire Charvet 黑瓜 geekingfrog

💭
🐸
View GitHub Profile
@geekingfrog
geekingfrog / excetion in coroutine
Created January 25, 2014 04:49
Yield and uncaught exception in coroutine
var Promise = require('bluebird');
// log the error
Promise.onPossiblyUnhandledRejection(function(error){
// this will be called even though there is a catch
console.log('uncaught error here');
console.log(error);
});
var toCall = Promise.coroutine(function* () {