Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9091 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80683 invoked by uid 1010); 12 Apr 2004 21:31:18 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 80656 invoked from network); 12 Apr 2004 21:31:17 -0000 Received: from unknown (HELO mx.thebrainroom.net) (65.200.24.98) by pb1.pair.com with SMTP; 12 Apr 2004 21:31:17 -0000 Received: by mx.thebrainroom.net (Postfix, from userid 517) id B4D6014880BD; Mon, 12 Apr 2004 14:31:16 -0700 (PDT) Received: from tron (zaneeb.thebrainroom.net [82.133.1.138]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx.thebrainroom.net (Postfix) with SMTP id 5FA64148809B; Mon, 12 Apr 2004 14:31:11 -0700 (PDT) Message-ID: <00a801c420d5$9059e5b0$8a02a8c0@tron> To: "Adam Maccabee Trachtenberg" Cc: "PHP Internals" References: <1081740243.14476.11.camel@coogle.localdomain> Date: Mon, 12 Apr 2004 22:31:46 +0100 Organization: The Brain Room Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Status: No, hits=-0.5 required=5.0 tests=AWL,QUOTED_EMAIL_TEXT,REFERENCES version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-TBR-Filter: Virus scanned and defanged Subject: Re: [PHP-DEV] Exceptions and Errors From: wez@thebrainroom.com ("Wez Furlong") Note that sqlite does have an option to raise exceptions instead of errors. I haven't tried this myself; Marcus will be able to advise more on how this works. --Wez. > try { > $db = new SQLiteDatabase('foo.db'); > if ($db->query($sql)) { > // fetch rows > } else { > // handle error > } > } catch { > // handle exception > } > > It's really crazy to need to mix both types of error handling within > the same block of code.