test.js 239 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 'use strict'; let Promise = require('bluebird'); let co = Promise.coroutine; co(function*() { let a = yield Promise.reject(3); console.log('here'); a = 4; return a; })().then(a=>console.log(a)) .catch(a=>console.log(a));