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.
Created attachment 6058 [details] include exception name in message in JavaScript exception object
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?
Yes, I was thinking that would be a nice next step.
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?
(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.