if I remember correctly, the xml parser catches all RuntimeExceptions and
hides them.  I will verify tonight hopefully.  Thus catching a
RuntimeException around the parse method is code that will never be
executed.  I will verify and send a fix in for my particular case where I
got a useless exception, and the real exception was lost(ie. not chained)
thanks,
dean

> [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]

Reply via email to