Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Thrown errors are silent #50

Open
testerez opened this issue Dec 11, 2015 · 2 comments
Open

Thrown errors are silent #50

testerez opened this issue Dec 11, 2015 · 2 comments

Comments

@testerez
Copy link

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

'use strict'
let Sync = require('sync');
Sync(function(){
    throw 'error';
});

It does not print anything

@talha-asad
Copy link

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);
});

@airs0urce
Copy link
Contributor

I added pull-request. #53
Not sure why that line was commented, may be there is some reason, but now it works good for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants