Bug 6895

Summary: include exception names in JavaScript form of DOM exception
Product: WebKit Reporter: Darin Adler <darin>
Component: JavaScriptCoreAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Enhancement CC: maksim
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
include exception name in message in JavaScript exception object mjs: review+

Darin Adler
Reported 2006-01-28 18:21:28 PST
We should include the exception names in the JavaScript exceptions created for DOM exceptions. This will make the JavaScript console much nicer for cases where it's reporting a DOM exception.
Attachments
include exception name in message in JavaScript exception object (3.72 KB, patch)
2006-01-28 18:23 PST, Darin Adler
mjs: review+
Darin Adler
Comment 1 2006-01-28 18:23:26 PST
Created attachment 6058 [details] include exception name in message in JavaScript exception object
Maciej Stachowiak
Comment 2 2006-01-28 19:43:29 PST
Comment on attachment 6058 [details] include exception name in message in JavaScript exception object r=me Should we consider adding human readable messages to the exception as well?
Darin Adler
Comment 3 2006-01-28 20:27:07 PST
Yes, I was thinking that would be a nice next step.
Alexey Proskuryakov
Comment 4 2006-01-29 02:07:00 PST
Shouldn't rangeExceptionNames should also start with a zero, like exceptionNames? +static const char * const rangeExceptionNames[] = { + "BAD_BOUNDARYPOINTS_ERR", "INVALID_NODE_TYPE_ERR" +}; There is an extra semicolon in one line: + int nameTableSize;; There already was a bug requesting such an improvement (bug 6745) - should it be marked as a duplicate now, or can rather be used to tracking further enchancements?
Darin Adler
Comment 5 2006-01-29 08:56:36 PST
(In reply to comment #4) > Shouldn't rangeExceptionNames should also start with a zero, like > exceptionNames? > +static const char * const rangeExceptionNames[] = { > + "BAD_BOUNDARYPOINTS_ERR", "INVALID_NODE_TYPE_ERR" > +}; Yes, good catch! > There already was a bug requesting such an improvement (bug 6745) - should it > be marked as a duplicate now, or can rather be used to tracking further > enchancements? I think we should use that one to track further enhancement.
Note You need to log in before you can comment on or make changes to this bug.