We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The test script below succeeds in node.js with output of:
{ [Error: boo!] cause: [Error: boo!], isOperational: true } { [Error: boo!] cause: [Error: boo!], isOperational: true }
And fails in Trireme with output of:
{ [Error: boo!] name: 'Error', message: 'boo!', cause: [Error: boo!], isOperational: true, stack: undefined } { [TypeError: Cannot call method "apply" of undefined] message: 'Cannot call method "apply" of undefined', fileName: '/Users/sganyo/node_modules/bluebird/js/main/promisify.js#163(Function)', lineNumber: 11 }
The key item of note is that on Trireme, BlueBird.promisifiy() works where BlueBird.promisifyAll() fails.
BlueBird.promisifiy()
BlueBird.promisifyAll()
'use strict'; var BlueBird = require('bluebird'); var module = (function() { var me = {}; me.fail = function fail(cb) { cb(new Error('boo!')); }; return me; })(); function test(promisedFunction) { promisedFunction() .then(function(result) { console.log(result); }) .catch(function(err) { console.log(err); }); } // works in Trireme var promisifyFail = BlueBird.promisify(module.fail); test(promisifyFail); // fails in Trireme var asyncModule = BlueBird.promisifyAll(module); var promisifyAllFail = asyncModule.failAsync; test(promisifyAllFail);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The test script below succeeds in node.js with output of:
And fails in Trireme with output of:
The key item of note is that on Trireme,
BlueBird.promisifiy()
works whereBlueBird.promisifyAll()
fails.The text was updated successfully, but these errors were encountered: