db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: Torque generated objects throw Exception on save()
Date Wed, 02 Apr 2003 13:02:09 GMT
Check the documentation - there is a property available to specify the
exception that is thrown by save().

Cheers,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
.Mac Chat/AIM: seade at mac dot com


On 2/04/2003 6:13 PM, "Karl Stenerud" <karl@webartjapan.com> wrote:

> I've just noticed that my torque generated data objects' save() methods throw
> Exception:
> 
>   /**
>    * Stores the object in the database.  If the object is new,
>    * it inserts it; otherwise an update is performed.
>    *
>    * @throws Exception
>    */
>   public void save() throws Exception
>   {
>            save(AdminuserPeer.getMapBuilder()
>               .getDatabaseMap().getName());
>    }
> 
> 
> Is there any reason why this is type Exception and not TorqueException?
> With type Exception, I now have to place the save() call alone within its own
> try statement or else I'll have no way of knowing programmatically what
> subsystem the exception was thrown from.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 


Mime
View raw message