db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Stenerud <k...@webartjapan.com>
Subject Torque generated objects throw Exception on save()
Date Wed, 02 Apr 2003 08:13:18 GMT
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.


Mime
View raw message