Re: Re: PEAR_Exception - some refactoring
| From: | Greg Beaver | Date: | Sun, 29 Aug 2004 01:31:36 +0000 |
| Subject: | Re: Re: PEAR_Exception - some refactoring | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-33027@lists.php.net to get a copy of this message | ||
Bertrand Mansion wrote:
I have updated the code at: <http://www.mamasam.com/pear/Exception.phps> The snippet above is now supported (global context, no trace available from Exception) thanks to the use of function debug_backtrace(). I had to add a new getTraceSafe() method specifically for that case. I have also added a new toText() method to get a plain text version of the trace along with causes messages. Let me know if you have any other ideas, comments, critics.The new version is much improved, especially as the message generation can be even more easily overridden by child classes. I think the only changes that might need to happen are extra features for multiple errors and promoting a warning Greg