#22 Add severity code to SAXParseException

Rob Lugt

This RFE reflects a recent discussion on the sax-devel
mailing list.

When an application catches a SAXParseException (as
opposed to being passed one in the ErrorHandler
methods), the severity of the error that generated the
SAXParseException (Fatal/Error/Warning) is lost.

In many cases this is not a problem because only fatal
errors throw the SAXParseException by default.

However, in the case where the application is not in
full control or knowledge of which ErrorHandler is
registered, it's possible for the registered
ErrorHandler to throw SAXParseExceptions pertaining to
warning or error events.

This situation could be rectified by adding a severity
property to SAXParseException. This property would be
accessed by getSeverity()/setSeverity() methods which
accept and return the following set of values:-
"error", "fatalError", and "warning" or null

Open Questions/Issues

1) This RFE reflects a mail conversation between Rob
Lugt and Dave Brownell. It would benefit from wider
input before being accepted into a future version of

2) It may be useful to have a mechanism to ensure the
severity code is consistent with the URI of any
message identifier associated with the

3) Should the set of permitted values be extensible?