-
Notifications
You must be signed in to change notification settings - Fork 13
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
Always print AsyncProfile.create #8
Comments
I have the same problem after a short test in my app. Haven't tried on unit test. I'm using a promise chain using when.js and I also have only AsyncProfile.create displayed instead of actual functions. |
The bug is probably in this code: https://github.com/ConradIrwin/async-profile/blob/master/src/result.coffee#L57-L72 Please let me know if you can reproduce it with a small example (or even debug it yourself ;), the code goes to some lengths to avoid this happening. |
hi ConradIrwin, i think the root cause of this issue is "err = new Error()", we should create error in the callback context, not async-profile itself, for example: a.test(param1, function(b) {
var err1 = new Error();
b.test(param2, function(c) {
var err2 = new Error();
c.test(param3, function(d) {
var err3 = new Error();
//....
}
});
}); but when i review your code, the error is created inside async profile, so it will always print this code |
Same problem here… |
The bug seems to be because the NPM version (0.4.0) is different from the version on GitHub. NPM's second lines loop, corresponding to this: Correcting that line gets rid of all the "AsyncProfile.create" stuff. |
The text was updated successfully, but these errors were encountered: