- A definable callback function (same features as exception observers)
- Stackable warnings
- Size control over the stack
- Per-context warning adding and retrieving
Beware of feature creap :)
I was keen not to see the stack in the core app, rather it was in a observer - I guess setting a default stack size to 1 would probably have the same result..
I wonder if having the ability to elevate warnings to exceptions may be overdesigning the class.. - Trouble is that designing something as core as the error/warning handler, you are between a rock and and hard place (or whatever the phrase is). Your dammed if you add it in and dont need it, and your dammed if you dont, and you have to break BC later.. :)
Regards
Alan
All that in just ~30 lines extra code for PEAR_Exception. I've commited the code to CVS for easily reviewing:
http://cvs.php.net/co.php/pear-core/PEAR/Exception.php?&r=1.7
Don't worry I'll remove the code once people comment it.
Tomas V.V.Cox
Btw: Planning to rename PEAR_Exception to PEAR_Error
Greg Beaver wrote:
------------------------------------------------------------------------
<?php
require_once 'PEAR/Exception.php';
class PEAR_Warning extends PEAR_Exception {
[..]