commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Cohen <sco...@javactivity.org>
Subject Re: [NET] ParserInitializationException root cause
Date Wed, 16 Mar 2011 01:34:40 GMT
On 03/15/2011 06:40 PM, Daniel Gredler wrote:
> Hi all,
>
>
>
> I have a question about ParserInitializationException; it appears to
> have its own "rootCause" instance variable, rather than using
> RuntimeException's constructors which allow a cause to be specified
> (ParserInitializationException extends RuntimeException). So for example
> on line 53 of the class [1], I would expect to see a simple invocation
> to "super(message, rootCause)".
>
>
>
> The reason this has come up is that we're logging these exceptions using
> log4j, but because ParserInitializationException doesn't use the
> standard JDK exception chaining, we don't get visibility into the root
> issue. Does anyone know why this exception was built this way? Would
> anyone else consider this a bug?
>
>
>
> Take care,
>
>
>
> Daniel
>
>
>
> [1]
> http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/
> apache/commons/net/ftp/parser/ParserInitializationException.java?view=ma
> rkup
>
>
>
>

I plead guilty.  That was my code.  I couldn't imagine why I would have 
done something that ridiculous.  Had to dig into java source to realize 
that exception chaining was a feature added in jdk 1.4.  Hard to 
remember back that far!

I see no reason why your bug fix suggestion should not be adopted.

Steve Cohen

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message