db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John McNally <jmcna...@collab.net>
Subject Re: cvs commit: db-torque/src/java/org/apache/torque/util BasePeer.java Transaction.java
Date Fri, 22 Aug 2003 15:49:44 GMT
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:
> jmcnally@apache.org 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: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message