-
Notifications
You must be signed in to change notification settings - Fork 46
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
Usability in development mode with thrown errors #56
Comments
I noticed this recently as well. It seems like a bug in the chrome dev tools: if I put a breakpoint where the error is being re-thrown and inspect |
Need to produce an isolated case and send it to Chromium https://code.google.com/p/chromium/issues/list But will also have to work around the problem here, for now. |
I'm not sure if hacking around the problem here will be of much use to most promise libraries. I suspect it will only fix the problem in certain isolated cases. |
Attempts to isolate have so far been in vain. I created a bundle from the following and it did not exhibit the missing stack trace problem in Chrome dev tools. var asap = require('./asap');
asap(function () {
throw new Error('Fake');
}); I also tried this stand-alone, gradually adding complications without being able to reproduce the problem: var pendingErrors = [];
function requestThrow() {
setTimeout(rethrow);
}
function rethrow() {
throw pendingErrors.shift();
}
function stackFrame() {
try {
indirection();
} catch (error) {
pendingErrors.push(error);
requestThrow();
} finally {
}
}
function indirection() {
throw new Error("Example");
}
setTimeout(function () {
stackFrame();
}, 100); So there appears to be an exogenous factor. |
We could always add an |
Evidently, at least in recent Chrome, errors that are captured and released asynchronously lose their stack traces.
Options to mitigate this would include at least:
cc @rkatic
The text was updated successfully, but these errors were encountered: