Closed
Bug 89697
Opened 23 years ago
Closed 23 years ago
trying to create CDATA section in HTML document gives confusing error message on JS console
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WORKSFORME
mozilla1.0.1
People
(Reporter: jruderman, Assigned: jst)
References
()
Details
Trying to create a CDATA section in an HTML document gives this cryptic error
message on the JS console:
[Exception... "Component returned failure code: 0x80530009
[nsIDOMHTMLDocument.createCDATASection]" nsresult: "0x80530009 ()" location: "JS
frame :: :: :: line 0" data: no]
The error message should at least include "NOT_SUPPORTED_ERR" (as specified by
DOM 2) or "... is not supported". It might be nice if it could say "You can't
use createCDATASection in an HTML document, try createTextNode instead", but
that might be overkill.
The testcase from bug 9741,
http://www.people.fas.harvard.edu/~dbaron/dom/test/one-core-html/exceptions,
seems to indicate that the correct exception, NOT_SUPPORTED_ERR (9), is being
thrown.
DOM 2 reference: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-D26C0AF8
Assignee | ||
Comment 1•23 years ago
|
||
Nice to have, but not a show stopper.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Comment 2•23 years ago
|
||
actually, we seem to not have number-to-string conversion hooked up for any of
the DOM errors (eg DOM_SYNTAX_ERR or NOT_SUPPORTED_ERR). Things like
NS_ERROR_FAILURE seem to show up in exceptions as a string just fine....
Reporter | ||
Updated•23 years ago
|
Severity: normal → minor
Comment 3•23 years ago
|
||
Bug #27403 is probably related to this one. Not sure if one is a dup of the other.
Comment 4•23 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1
(you can query for this string to delete spam or retrieve the list of bugs I've
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Comment 5•23 years ago
|
||
Jesse, do you like the error thrown better now? :-)
Reporter | ||
Comment 6•23 years ago
|
||
I now see:
[Exception... "Object cannot be created in this context" code: "9"
nsresult: "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)" location: "<unknown>"]
That's good enough, wfm.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•