Req #54033 [NEW]: add get_error_handler and get_exception handler
From:
Operating system:
PHP version: 5.3.5
Package: Scripting Engine problem
Bug Type: Feature/Change Request
Bug description:add get_error_handler and get_exception handler
Description:
------------
my co-worker had a problem with the Zend Framework Soap Server class: he
was
using trigger_error for handling the application level errors, and the ZF
Soap
Server class set his own error_handler, so my co-worker's error handler was
swapped out, and his E_USER_WARNING/E_USER_ERROR errors was ignored (if you
have
an userspace error handler then every error type, which isn't observed will
be
discarded)
I mentioned this on twitter (I wasn't really nice)
http://twitter.com/#!/Tyr43l/status/22704699030
and Matthew Weier O'Phinney responded that they had to do this, because
there
was some quirks about the SoapServer or DomDocument class.
so if they don't set their error_handler, they can't handle the error, if
they
do, they will overwrite any existing error_handler.
if there would be a way, to get the current(previous) error handler, then
they
could have save the current/previous error handler (with the error type
parameter!) and from their error handler, they could have call the applevel
error handler callback.
of course, some stackable mechanism, like the spl_autoload would be a more
better approach but that would break BC, at least I couldn't figure out a
way to
do it without problems.
I will ask Matthew to comment on this issue (what was the exact problem
that
forced them to set the error handler at the first place)
--
Edit bug report at http://bugs.php.net/bug.php?id=54033&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54033&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54033&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54033&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54033&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54033&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54033&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54033&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54033&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54033&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54033&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54033&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54033&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54033&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54033&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54033&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54033&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54033&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54033&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54033&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54033&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54033&r=mysqlcfg
Thread (13 messages)
- tyra3l at gmail dot com
- rasmus@php.netReq #54033 [Opn->Bgs]: add get_error_handler and get_exception handler
- tyra3l at gmail dot comReq #54033 [Com]: add get_error_handler and get_exception handler
- rasmus@php.netReq #54033 [Bgs->ReO]: add get_error_handler and get_exception handler
- tyra3l at gmail dot comReq #54033 [Com]: add get_error_handler and get_exception handler
- tyra3l at gmail dot comReq #54033 [ReO->Csd]: add get_error_handler and get_exception handler
- tyra3l at gmail dot comReq #54033 [Csd->Asn]: add get_error_handler and get_exception handler
- tyrael@php.netReq #54033 [Asn->Opn]: add get_error_handler and get_exception handler
- matthew dot bonner at gmail dot comReq #54033 [Com]: add get_error_handler and get_exception handler
- matthew dot bonner at gmail dot comReq #54033 [Com]: add get_error_handler and get_exception handler
- matthew dot bonner at gmail dot comReq #54033 [Com]: add get_error_handler and get_exception handler
- tyrael@php.netReq #54033 [Asn]: add get_error_handler and get_exception handler
- kalle@php.netReq #54033 [Asn->Opn]: add get_error_handler and get_exception handler