Re: Error supressing in PHP5 [was PEAR_Interop... [was PEAR_Warning...]]

From: Date: Tue, 13 Jul 2004 22:06:54 +0000
Subject: Re: Error supressing in PHP5 [was PEAR_Interop... [was PEAR_Warning...]]
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-31993@lists.php.net to get a copy of this message
On Tue, 13 Jul 2004 22:51:36 +0100, Jon Wood <jellybob@gmail.com> wrote: > I've never used set_exception_handler, but could a custom handler be > developed (possibly along with PEAR_Exception) which would allow a > list of exceptions to expect and ignore be developed, with anything > that isn't expected being displayed? > > This would also work for non-PEAR packages, since it would simple be > given the list of classes to expect, and would allow trees of > exceptions to be ignored by defining their parent class > (PEAR_Exception...) as one to ignore. > Unless all of the refs I found from google are wrong (this isn't in the docs yet...argh!), this function is only called when an exception reaches the top level uncaught. This would mean that the stack has already been unraveled, so this wouldn't work unless it: 1) is run for *every* exception 2) allows for stopping an exception form being thrown (ie, re-throw the exception or return true if you want the exception to keep going) This wouldn't really be the same function as the current set_exception_handler(). If this did get implemented, I would suggest that the current set_exception_handler() be renamed to set_default_exception_handler() and the new function be set_exception_handler(). -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin--

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