Re: [PHP] set_error_handler help

[email protected] (Richard Heyes)
Newsgroups php.general
Message-ID <[email protected]>
> Is there any way to use a class to handle errors? I've tried some stuff like
> set_error_handler("Error_Handler::logError" and such, but with no luck.

It accepts a "callback type, which is a pseudo type. Basically an array 
containg the object and the method to use. Eg.

$obj = new ErrorHandlingObject();
set_error_handler(array($obj, 'myMethod'));

-- 
Richard Heyes

+----------------------------------------+
| Access SSH with a Windows mapped drive |
|    http://www.phpguru.org/sftpdrive    |
+----------------------------------------+
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.