[EMAIL PROTECTED] wrote:
} catch(RuntimeException e) {
//note: passing in cause exception to constructor does not work,
//use initCause instead which works.
SAXParseException ee = new SAXParseException("Error in file
being parsed:"+getCurrentLocation(), loc);
ee.initCause(e);
throw ee;
}
I understand the rationale, but I really do believe that catching
RuntimeExceptions can be done by the XML parser at a single place (in
XMLReader.parse(...)) and thus should be done there. In other words, my
opinion is not to add such exception handlers.
However, note the following: The JaxMe generated sources should *not*
throw RuntimeExceptions, but generate parse events. In other words, if
your RuntimeException comes out of generated code, then that code ought
to be changed.
Jochen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]