-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
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
Uninformative stack traces #4
Comments
Thanks for the suggestion. Do you have an example of what you mean by the stack trace is uninformative? |
syncho vs futures: var Sync = require('syncho');
var obj = {
asyncError: function (text, cb) {
process.nextTick(function() {
cb(new Error('argh'));
});
}
};
Sync(function (){
try {
obj.asyncError.sync(null, 'Hello!');
} catch (e) {
console.log(e.stack);
}
});
var Future = require('fibers/future');
obj = Future.wrap(obj);
Future.task(function () {
try {
obj.asyncErrorFuture('Hello').wait();
} catch (e) {
console.log(e.stack);
}
}).detach(); output:
Note that we see the critical line 22 in futures, whereas in syncho we only see the stack processing the tickCallback. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Perhaps something like:
https://github.com/laverdet/node-fibers/blob/master/future.js#L195
would help?
The text was updated successfully, but these errors were encountered: