You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Brian Minchau (JIRA)" <xa...@xml.apache.org> on 2005/05/03 23:26:36 UTC

[jira] Updated: (XALANJ-2094) Don't wrap RuntimeExceptions

     [ http://issues.apache.org/jira/browse/XALANJ-2094?page=all ]

Brian Minchau updated XALANJ-2094:
----------------------------------

    fix-priority: fp4

> Don't wrap RuntimeExceptions
> ----------------------------
>
>          Key: XALANJ-2094
>          URL: http://issues.apache.org/jira/browse/XALANJ-2094
>      Project: XalanJ2
>         Type: Bug
>     Versions: 2.6
>     Reporter: Frederic Simard
>     Assignee: Joanne Tong

>
> In org.apache.xalan.transformer.TransformerImpl  the  RuntimeExeption are wrapped which is annoying and also introduce limitations. That is why I am proposing to throw them instead of wrapping them.  
> Example:
> In the run method, the only exception is catch, which wrap the any thrown runtime exception.
> Now it likes that:
>     try
>     {
>  ...        
>      }
>     catch (Exception e)
>     {
>       // e.printStackTrace();
>       if (null != m_transformThread)
>         postExceptionFromThread(e);
>       else 
>         throw new RuntimeException(e.getMessage());         // Assume we're on the main thread.
>     }
> Should be replaced by something like this:
>     try
>     {
>  ...
>         
>      }
>     catch (RuntimeException e)
>     {
>       // e.printStackTrace();
>       if (null != m_transformThread)
>         postExceptionFromThread(e);
>       else 
>         throw e;
>     }
>     catch (Exception e)
>     {
>       // e.printStackTrace();
>       if (null != m_transformThread)
>         postExceptionFromThread(e);
>       else 
>         throw new RuntimeException(e.getMessage());         // Assume we're on the main thread.
>     }

-- 
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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org