-
Notifications
You must be signed in to change notification settings - Fork 835
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
CB-9366 Log error.stack as it helps with diagnosing the source of the… #118
Conversation
I would leave this to userland. Also, on iOS this is going to look like : |
What's the downside of adding this? This is really an exceptional scenario and should not hit commonly to clutter console log with ugly stack traces. Also, rethrowing the error will reset it's stack property - depending on which runtime and platform you are using and hence. window.onerror might not get the actual stack that caused the error. |
Not a huge deal. I was assuming that most errors here would be the result of a missing callback, in which case stack.length is 0. |
If you have multiple calls to cordova methods and one of them might be missing a callback or passing another incorrect argument (like in a scenario similar to the recent |
This try-catch for callbacks is a real pain. Having access to errors as they occur is highly desirable. And there appears to be a logic error here where callbacks are never deleted if they throw an error. Isn't managing errors a responsibility outside of |
@jimmont Why is the |
@nikhilkh Yes. Throwing errors is a reliable way of both debugging and finding problems. In fact I don't know of a more reliable way to debug. When they're intercepted I can't do that as easily. (Similar is true of |
@nikhilkh Is this PR still relevant? If so, could you take a look at the conflicts please? |
Looks like it would be really nice to have this enhancement, maybe for the next major release. |
I am okay if you want to merge it, my initial point of view was just that there are other ways of handling this, but it’s not a huge deal to me ...
… On Jun 18, 2018, at 1:29 AM, Christopher J. Brody ***@***.***> wrote:
Looks like it would be really nice to have this enhancement, maybe for the next major release.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
as it helps with diagnosing the source of the error JavaScript fixed by @brodybits (Christopher J. Brody) ref: apache#118 Co-authored-by: Nikhil Khandelwal <nikhilkh@microsoft.com> Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
as it helps with diagnosing the source of the error JavaScript fixed by @brodybits (Christopher J. Brody) Fixes apache#118 Co-authored-by: Nikhil Khandelwal <nikhilkh@microsoft.com> Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
… error
https://issues.apache.org/jira/browse/CB-9366