Bug 117773
Summary: | DOMException toString can serialize more useful information | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | arv, chris_curtis, ggaren, mark.lam, mkwst, syoichi, thorton |
Priority: | P2 | Keywords: | BlinkMergeCandidate |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Ryosuke Niwa
Consider merging https://chromium.googlesource.com/chromium/blink/+/4010ed524b9d6348a76567b55fbe1a756a6f35ef
DOMException toString is not correct
We used to print:
"Error: HIERARCHY_REQUEST_ERR: DOM Exception 3"
Now we print a more useful message:
"HierarchyRequestError: The operation would yield an incorrect node tree."
that is:
`${error.name}: ${error.message}`
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
So, Chromium no longer prints the exception code, yet it prints arbitrary text from exception description that may or may not be relevant to the actual reason this particular exception was raised for? I don't think that it's an improvement overall.
Timothy Hatcher
I think some description is nice. I've had to search for DOM exception codes one to many times. I agree the exception code should still be in there.
Erik Arvidsson
The exception code is deprecated. Use the name property instead. Most new exceptions have the code set to 0.
AP: The error messages could definitely use some improvements. The long term goal was to allow the error message to be more specific based on were it was being set/thrown.