geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [Error handling] NullPointer or IllegalArgument?
Date Thu, 14 Aug 2003 10:07:11 GMT

Jason Dillon wrote:
> org.apache.geronimo.common.NullArgumentException extends IAE and 
> handles the formatting of the message too, so you can:
> throw new NullArgumentException("address");

Both NPE and IAE is a RuntimeException, then what's difference between
your idea above and below ?

org.apache.geronimo.common.NullArgumentException extends "NPE" and 
throw new NullArgumentException("address");
(the class name doesn't match with NPE though)

Alex Blewitt wrote:
>An NPE (to me) means a coding bug, usually requiring a lot of hard work 
>figuring out where it came from and why it exists

then, what if u use IAE, it's easier to figure out where it came ??
I think it's all up to how to code, catch and trace. I delaying to decide the coding standard or just a flamer ?

I cannot say which one is better right now but somehow afraid of
quick decision.


View raw message