Re: Exceptions and Errors

From: Date: Mon, 12 Apr 2004 21:31:46 +0000
Subject: Re: Exceptions and Errors
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-9091@lists.php.net to get a copy of this message
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.

« previous php.internals (#9091) next »