cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Royal <pro...@apache.org>
Subject Re: [BUG] very weird NPE in JXTemplateTransformer
Date Thu, 01 May 2003 01:18:56 GMT
On Tuesday, April 29, 2003, at 01:59  PM, Christopher Oliver wrote:
> I don't know how to recreate this problem. But probably the best thing 
> to do to debug this is to modify Xalan TransformerImpl.java to not 
> swallow the stacktrace of the original NPE. If you do that, then 
> repost the real stack trace and I'll take a look at it.

My strategy to work around this has been to:

Create a new exception:

public class CascadingSAXException extends SAXException implements 
CascadingThrowable
{
  ...
}

And wrap all transformer / generators in something like:


void startElement( ... )
{
    try
    {
       ... logic ...
    }
    catch( SAXException e )
    {
        throw e;
    }
    catch( Exception e )
    {
        throw new CascadingSAXException( e );
    }
}


-pete


Mime
View raw message