Re: [PHP] Error recovery - fatal errors

2011-05-16 Thread Tim Streater
On 16 May 2011 at 21:34, Peter Lind wrote: > You were trying to call a method on a non-object - how do you expect > PHP to handle that if not with a fatal error? > Anyway, good to hear you solved the issue - I misunderstood what you > wanted to do (shut down in a proper fashion, not actually rec

Re: Re: [PHP] Error recovery - fatal errors

2011-05-16 Thread Peter Lind
On 16 May 2011 22:14, Tim Streater wrote: > On 14 May 2011 at 15:05, Peter Lind wrote: > >> On 14 May 2011 12:33, Tim Streater wrote: >>> I would like, in my app, to recover from as many run-time errors as >>> possible, >>> so that I can tidy up. And unsolicited output generated by the standard

Re: Re: [PHP] Error recovery - fatal errors

2011-05-16 Thread Tim Streater
On 14 May 2011 at 15:05, Peter Lind wrote: > On 14 May 2011 12:33, Tim Streater wrote: >> I would like, in my app, to recover from as many run-time errors as possible, >> so that I can tidy up. And unsolicited output generated by the standard error >> system is really unhelpful as it becomes pa

Re: [PHP] Error recovery - fatal errors

2011-05-16 Thread David Harkness
You can register a shutdown function that gets called even in the case of a fatal error. We use something like this: public function init() { register_shutdown_function(array('Bootstrap', 'fatalErrorCatcher')); ... } public function fatalErrorCatcher() { $error

Re: [PHP] Error recovery - fatal errors

2011-05-14 Thread Peter Lind
On 14 May 2011 12:33, Tim Streater wrote: > I would like, in my app, to recover from as many run-time errors as possible, > so that I can tidy up. And unsolicited output generated by the standard error > system is really unhelpful as it becomes part of the ajax reply to the > browser. > > So I'

[PHP] Error recovery - fatal errors

2011-05-14 Thread Tim Streater
I would like, in my app, to recover from as many run-time errors as possible, so that I can tidy up. And unsolicited output generated by the standard error system is really unhelpful as it becomes part of the ajax reply to the browser. So I've added my own error handler, but it seems that I can'