Re: question about DB

From: Date: Fri, 02 Nov 2001 17:42:19 +0000
Subject: Re: question about DB
References: 1  Groups: php.pear.dev php.pear.general 
Request: Send a blank email to pear-dev+get-2517@lists.php.net to get a copy of this message
On Friday 02 November 2001 17:22, Jon Hartzler wrote: > I have a question about DB is it supposed to handle errors in the > same ways as any other object that extends pear? Yes, your code should work (obviously if set up that 'pearErrorHandler' function). Try this code: <?php error_reporting(E_ALL); function phpe ($a, $b, $c, $d) { echo "$a $b $c $d\n"; } set_error_handler('phpe'); <rest of your code> ?> and see if something wrong happens. Please also provide your version of the PEAR.php class, DB.php and the driver you are using. Tomas V.V.Cox > For example. > > if I .... > > PEAR::setErrorHandling (PEAR_ERROR_CALLBACK, 'pearErrorHandler'); > > > $db = DB::connect(DSN); > > // then send a bad query > $result = $db->query('seasdkfl;asdfl;ksdfkasdfl;klfdsl;asdf;l'); > > > Is the DB object supposed to send the error to the pearErrorHandler > that I have set? > I have not been able to make that happen. Is there another step that > I need to do like > > DB::setErrorHandling () > > Thanks Jon Hartzler

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