RE: [PEAR] Apply an Error-Handler to all PEAR::DB Querys

From: Date: Thu, 05 Jun 2003 12:19:08 +0000
Subject: RE: [PEAR] Apply an Error-Handler to all PEAR::DB Querys
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5822@lists.php.net to get a copy of this message
> But I would like to have a global handler, so every time I > send a query to > my database, $db is checked for errors, without writing it > down after each > query. How could I do this? function errorHandling(&$error) { die($error->getMessage()); } PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'errorHandling'); the code maybe a bit wrong but you get the idea :) Arnaud.

« previous php.pear.general (#5822) next »