W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2002

ASException/DOMException/XPathException overlap is problematic

From: Curt Arnold <carnold@houston.rr.com>
Date: Sat, 20 Apr 2002 14:34:06 -0500
Message-ID: <007b01c1e8a2$561b9a00$a800a8c0@CurtMicron>
To: <www-dom@w3.org>
The similarity and overlap between ASException, XPathException and DOMException would appear to be problematic.  If a caller in a loosely-typed binding received an exception, it would be difficult to distinguish between the exceptions.

The overlap in symbolic names that I've noticed are:

ASException.INVALID_CHARACTER_ERR == DOMException.INVALID_CHARACTER_ERR == 5

ASException.VALIDATION_ERR == 6, DOMException.VALIDATION_ERR == 16

ASException.TYPE_ERR == 2, XPathException.TYPE_ERR == 2

The overlap of code values would seem to be totally avoidable,  there is not a shortage of distinct integer values and it should be very easy just to assign, for example, XPathException.TYPE_ERR = 102, so that it will never be misinterpreted as a DOMException.DOMSTRING_SIZE_ERR.
Received on Saturday, 20 April 2002 15:34:20 GMT

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