8000 Log stringified exceptions in debug output by abaevbog · Pull Request #5164 · zotero/zotero · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Log stringified exceptions in debug output #5164

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abaevbog
Copy link
Contributor

If an exception (e.g. Zotero.Exception.UnloadedDataException) is thrown without the debugger enabled, it can be logged as a non-descriptive [JavaScript Error: "uncaught exception: Object"].

This stringifies the exception object and puts the string into the message, so that the actual error and the stacktrace are not lost.

Initially brought up in #5163 (comment).

For a recent minimal example, this is a debug ID with the Zotero.Exception.UnloadedDataException triggered on current beta: D1339492968. Notice no information but [JavaScript Error: "uncaught exception: Object"] at the top.

For comparison, the debug ID from this PR D592550858 has JSON stringified "Item ... not yet loaded" error message.

If an exception (e.g. Zotero.Exception.UnloadedDataException)
is thrown without the debugger enabled (meaning, by most
users), it is logged as a non-descriptive
[JavaScript Error: "uncaught exception: Object"].

This stringifies the exception object and puts the
string into the message, so that the actual error and the
stacktrace are not lost.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0