Re: exceptions

From: Date: Tue, 08 Jun 2004 16:01:27 +0000
Subject: Re: exceptions
References: 1 2 3 4 5 6 7 8 9  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30182@lists.php.net to get a copy of this message
Alan Knowles wrote:
I'm not sure how this could be handled with PEAR_ErrorStack, but DataObjects and Flexy have both evolved a user configurable critical error handling mechanism, which theoretically may suit this cunundarum.. * Beginners are going to be totally baffled/annoyed by exceptions. * Exception purists are going to be fustrated if PEAR doesnt embrace them.
This is what PDO does .. you essentially get to choose what happens. // let's have exceptions instead of silence. // other modes: PDO_ERRMODE_SILENT (default - check $stmt->errorCode() and $stmt->errorInfo())
//              PDO_ERRMODE_WARNING (php warnings)
$dbh->setAttribute(PDO_ATTR_ERRMODE, PDO_ERRMODE_EXCEPTION); regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07

« previous php.pear.dev (#30182) next »