Re: [PHP.next] Error-handling using "Error Events"
Hi!
> You manually have to reconstruct the stack trace from the exception
Not sure what you mean here - exception would have the whole stack
trace, why anything will need to be reconstructed?
> handler; also, with this approach you lose the ability to fine-control
> where you want to react on which exceptions in which way - unless you
> do a save/restore every time...
Not clear here either - save/restore what?
> Also, you need to parse the error string by PHP (e.g. in one code
> block you do a fopen followed by a mysqli_connect, both might throw
> you a E_WARNING) in order to find out what's going on.
This is true, but not sure how autoconverting errors to exceptions with
ini_set would change that - unless you change every piece of code to use
individual exception class - which is a huge chunk of work and goes way
beyond ini setting - you still have no idea what happens without
checking the message, exception or not.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227
Thread (13 messages)