Closed
Bug 132302
Opened 24 years ago
Closed 24 years ago
Need to return the right exception for DOM Range exceptions
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.0
People
(Reporter: peterv, Assigned: sicking)
Details
Attachments
(1 file, 3 obsolete files)
|
45.21 KB,
patch
|
axel
:
review+
axel
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
Currently we only return DOMException and the error codes are wrong (101 and
102). We need to implement RangeException with the right errorcodes. Patch
coming up later today.
| Reporter | ||
Comment 1•24 years ago
|
||
I think we should take this for mozilla1.0. Returning the wrong exception and
the wrong code is bad and if we don't change it now, we'll be locked in for a
long time. Also, my patch allows us to add new exception classes easily, so if
somebody ever implements some other DOM module that has its own excpetion class
(there are some already), they can do the right thing immediately.
| Reporter | ||
Comment 2•24 years ago
|
||
This patch implements a nsBaseDOMException with an nsIBaseDOMException
interface. This object also implements the nsIException interface so that the
actual DOM exception classes can all reuse the same code for that. The internal
DOM exception classes (the ones implemented inside the DOM module) inherit from
the base exception class, the external ones keep a base exception as a member
variable and forward the calls. I've also provided some macros to implement an
internal exception or an external exception. I've converted the two existing
exception (DOMException and XPathException) to this new scheme and I've added
RangeException.
Comment 3•24 years ago
|
||
Comment on attachment 75298 [details] [diff] [review]
v1
sr=jst
Attachment #75298 -
Flags: superreview+
| Reporter | ||
Comment 4•24 years ago
|
||
Forgot to include the XPathException part (sorry jst). I changed the license in
the new files to triple MPL (no new patch for that).
Comment 5•24 years ago
|
||
Comment on attachment 75298 [details] [diff] [review]
v1
>Index: mozilla/dom/public/nsIBaseDOMException.h
<...>
>+#define IMPL_DOM_EXCEPTION_TAIL(classname, ifname, domname, module, \
>+ mapping_function) \
<..>
>+NS_DEFINE_CID(kBaseDOMException_CID, NS_BASE_DOM_EXCEPTION_CID); \
what happens if you have two exception implementations in one file?
>Index: mozilla/dom/public/idl/range/MANIFEST_IDL
/me shakes the patch heavily, but neither the Makefile.in nor the makefile.win
pop up.
>Index: mozilla/dom/public/idl/range/nsIDOMRangeException.idl
<...>
>+#include "domstubs.idl"
naah, too much copy'n'paste
So this should do, but as the thing doesn't build I don't hit a checkbox.
I'd like a word on the kBaseDOMException_CID, too.
Either add a comment warning to use these macros only once per source or
just name that k##domname##BaseDOMException_CID or so.
I wonder if I need to proof read the licenses ;-)
Apart from this, I liked the code better the more I looked.
| Reporter | ||
Comment 6•24 years ago
|
||
New patch coming up after I've verified it builds on Windows and Linux.
| Reporter | ||
Comment 7•24 years ago
|
||
New patch, the nsXPathException changes still need sr too. Builds on Linux and
Windows (Windows not completely done but seems ok).
Attachment #75298 -
Attachment is obsolete: true
Attachment #75579 -
Attachment is obsolete: true
Comment 8•24 years ago
|
||
Comment on attachment 77453 [details] [diff] [review]
v1.1
sr=jst
Attachment #77453 -
Flags: superreview+
| Reporter | ||
Comment 9•24 years ago
|
||
Fixed some of Pike's nits.
Attachment #77453 -
Attachment is obsolete: true
Comment 10•24 years ago
|
||
Comment on attachment 77662 [details] [diff] [review]
v1.2
r=me, built and tested on
solaris, both debug and optim.
Copying sr by jst
Attachment #77662 -
Flags: superreview+
Attachment #77662 -
Flags: review+
Comment 11•24 years ago
|
||
Comment on attachment 77662 [details] [diff] [review]
v1.2
a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #77662 -
Flags: approval+
| Reporter | ||
Comment 12•24 years ago
|
||
Seems Netscape is not interested in taking this fix at this point. If anyone
wants to check this in, feel free.
| Reporter | ||
Comment 13•24 years ago
|
||
This was checked in on the trunk by Jonas Sicking
Whiteboard: [fixed on trunk]
| Assignee | ||
Comment 15•24 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
So seems like Jonas checked this in on the 1.0.0 branch (04/21/2002 11:01),
adding keyword.
Keywords: fixed1.0.0
Whiteboard: [fixed on trunk]
Updated•13 years ago
|
Component: DOM: Traversal-Range → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•