note 109417 added to function.set-exception-handler
| From: | Marinu666-Tony | Date: | Mon, 16 Jul 2012 00:44:42 +0000 |
| Subject: | note 109417 added to function.set-exception-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-189148@lists.php.net to get a copy of this message | ||
As the post above suggests you can use it with public methods on a class, incase anybody was
wondering this is how!
inside your class - you would have the normal, heres an example
class ehandle {
// constructor etc?
public function error_handler($errno, $errstr, $errfile, $errline) {
//logic
}
// maybe an exception handler here too ^.^
}
$ehandler = new ehandle();
// Error Handler With non-static as such
set_error_handler(array(&$ehandler, "error_handler"), E_ALL);
// Exception Handler with non-static as such
set_exception_handler(array(&$ehandler, "excep_handler"));
If somebody finds this helpful :) My work here is done!
----
Server IP: 69.147.83.197
Probable Submitter: 176.253.184.85
----
Manual Page -- http://www.php.net/manual/en/function.set-exception-handler.php
Edit -- https://master.php.net/note/edit/109417
Del: integrated -- https://master.php.net/note/delete/109417/integrated
Del: useless -- https://master.php.net/note/delete/109417/useless
Del: bad code -- https://master.php.net/note/delete/109417/bad+code
Del: spam -- https://master.php.net/note/delete/109417/spam
Del: non-english -- https://master.php.net/note/delete/109417/non-english
Del: in docs -- https://master.php.net/note/delete/109417/in+docs
Del: other reasons-- https://master.php.net/note/delete/109417
Reject -- https://master.php.net/note/reject/109417
Search -- https://master.php.net/manage/user-notes.php