[ 
http://issues.apache.org/jira/browse/XALANJ-2262?page=comments#action_12420680 
] 

Brian Minchau commented on XALANJ-2262:
---------------------------------------

The code in displayMessage() catches the exception from the user's 
ErrorListener and ignores it. The right behavior is to throw the exception from 
the ErrorListener.

Brian Minchau agreed to look a quick fix for this one.

Triaged July 11, 2006.

> Exceptions from Error Listener Are Ignored
> ------------------------------------------
>
>          Key: XALANJ-2262
>          URL: http://issues.apache.org/jira/browse/XALANJ-2262
>      Project: XalanJ2
>         Type: Bug

>   Components: XSLTC
>     Versions: 2.7
>  Environment: Windows XP, Sun JDK 1.4.2
>     Reporter: D Gardner

>
> In interpretive Xalan, exceptions thrown from the error listener configured
> using the Transformer.setErrorListener() method are reported as fatal
> errors and processing stops. In XSLTC, these exceptions are simply
> swallowed up.
> I have a stylesheet that is used to "validate" an XML file. When a validation
> error is detected, xsl:message is used to report the error. The error is
> passed to a cusom error listener as a warning, but the warning() method
> will throw an exception to indicate that the XML file has failed a validation.
> Xalan will see this exception, pass it to ErrorListener.fatalError() and then
> terminate, but XSLTC just ignores the exception (see the "displayMessage()"
> method in the an inner class of: org.apache.xalan.xsltc.trax.TransformerImpl.
> According to the TRAX API documentation for  
> javax.xml.transform.ErrorListener,
> it is up to the application to decide if processing should continue when a
> warning is reported. Processing should terminate if the "warning()" method
> throws an exception but continue if it does not throw an exception. As XSLTC
> always continues and ignores the exception, it does not conform to the TRAX
> API.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to