Open testerez opened 8 years ago
try this instead:
'use strict'
let Sync = require('sync');
Sync(function(){
throw 'error';
}, function(err, result) {
if (err) return console.error('Error: ', err);
console.log('Result: ', result);
});
I added pull-request. https://github.com/ybogdanov/node-sync/pull/53 Not sure why that line was commented, may be there is some reason, but now it works good for me.
I'm not shure that it is actualy an issue but when I throw an exception I'm expecting it to be visible in the console output.
Here is a example code I run on node 5.1.0
It does not print anything