W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2001

Which Exception should be raised when multiple codes are possible

From: Tobias Peters <t-peters@gmx.de>
Date: Sat, 27 Oct 2001 21:54:40 +0200 (CEST)
To: <www-dom@w3.org>
Message-ID: <Pine.LNX.4.33.0110272131390.15724-100000@futsch>
Hi,

In DOM Level 2 Core, it is not clear which of several possible Exceptions
a method should raise.

Example:

DocumentType::replaceChild (inherited from Node)

Possible exception codes listed in the recommendation are
HIERARCHY_REQUEST_ERR, WRONG_DOCUMENT_ERR, NO_MODIFICATION_ALLOWED_ERR,
NOT_FOUND_ERR.

Supposed that newChild is from the right document, all error conditions
except WRONG_DOCUMENT_ERR apply. (DocumentType is always readonly)

Which of these exception codes should be chosen, and what is the rule that
should be followed here? (DocumentType::replaceChild is far from being the
only method affected)

Thanks for any suggestions,

Tobias Peters
Received on Saturday, 27 October 2001 16:05:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:55 GMT