From seade@backstagetech.com.au Wed Apr 2 13:02:17 2003 Return-Path: Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 46344 invoked from network); 2 Apr 2003 13:02:17 -0000 Received: from mail.tpgi.com.au (HELO mail3.tpgi.com.au) (203.12.160.59) by daedalus.apache.org with SMTP; 2 Apr 2003 13:02:17 -0000 Received: from [192.168.0.2] (pen-56k-058.tpgi.com.au [203.58.15.58]) by mail3.tpgi.com.au (8.11.6/8.11.6) with ESMTP id h32D2Fr07273 for ; Wed, 2 Apr 2003 23:02:15 +1000 User-Agent: Microsoft-Entourage/10.1.1.2418 Date: Wed, 02 Apr 2003 23:02:09 +1000 Subject: Re: Torque generated objects throw Exception on save() From: Scott Eade To: Torque Users List Message-ID: In-Reply-To: <200304021713.18325.karl@webartjapan.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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" 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 >