Except the code used to throw an NPE in this case and it was considered
a violation of the contract, I think IAE would be similar.  I don't
necessarily agree, but I didn't have that strong an opinion. 
TorqueException is declared and users of the method expect to get a
TorqueException if something goes wrong.

john mcnally 

On Thu, 2003-08-21 at 15:25, Daniel Rall wrote:
> [EMAIL PROTECTED] writes:
> ...
> >   1.9       +18 -9     db-torque/src/java/org/apache/torque/util/Transaction.java
> >   
> >   Index: Transaction.java
> >   ===================================================================
> >   RCS file: /home/cvs/db-torque/src/java/org/apache/torque/util/Transaction.java,v
> >   retrieving revision 1.8
> >   retrieving revision 1.9
> >   diff -u -r1.8 -r1.9
> >   --- Transaction.java      18 May 2003 12:27:24 -0000      1.8
> >   +++ Transaction.java      3 Aug 2003 17:41:04 -0000       1.9
> >   @@ -182,7 +182,7 @@
> >        {
> >            if (con == null)
> >            {
> >   -            log.error("Connection object was null. "
> >   +            throw new TorqueException("Connection object was null. "
> >                        + "This could be due to a misconfiguration of the "
> >                        + "DataSourceFactory. Check the logs and Torque.properties "
> >                        + "to better determine the cause.");
> 
> IllegalArgumentException might make more sense here.
> -- 
> 
> Daniel Rall
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



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

Reply via email to