Re: error handling set_error_handler()

From: Date: Sun, 31 Mar 2002 14:55:01 +0000
Subject: Re: error handling set_error_handler()
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1066@lists.php.net to get a copy of this message
On Sun, 2002-03-31 at 05:33, Kancha wrote: > I'm using PEAR db and other few PEAR libraries in my application will > changing the set_error_handler to my own function effetct how PEAR db > and other PEAR libraries handle error ?? > > Can i make my own error handler to display error messages and also use > PEAR libraries ?? Try PEAR::setErrorHandling() for the general case or $obj->setErrorHandling() for limiting to a particular object's errors. Example: PEAR::setErrorHandling(PEAR_ERROR_DIE, "aaaargh: %s\n"); (will display "aaargh: error message\n" and die on errors) $obj->setErrorHandling(PEAR_ERROR_CALLBACK, "my_error_handler"); my_error_handler() will then be called with the error object as its only parameter. The available error modes are listed on http://pear.php.net/manual/en/class.pear-error.php. - Stig

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