note 70066 added to function.set-error-handler

From: Date: Mon, 02 Oct 2006 07:07:41 +0000
Subject: note 70066 added to function.set-error-handler
Groups: php.notes 
Request: Send a blank email to php-notes+get-117928@lists.php.net to get a copy of this message
2errd I've got more convenient and safe error to exception converter: class CustomException extends Exception { public static function errorHandlerCallback($code, $string, $file, $line, $context) { $e = new self($string, $code); $e->line = $line; $e->file = $file; throw $e; } } set_error_handler(array("CustomException", "errorHandlerCallback"), E_ALL); ---- Server IP: 66.163.161.117 Probable Submitter: 81.1.223.3 (proxied: 192.168.1.174) ---- Manual Page -- http://www.php.net/manual/en/function.set-error-handler.php Edit -- https://master.php.net/note/edit/70066 Del: integrated -- https://master.php.net/note/delete/70066/integrated Del: useless -- https://master.php.net/note/delete/70066/useless Del: bad code -- https://master.php.net/note/delete/70066/bad+code Del: spam -- https://master.php.net/note/delete/70066/spam Del: non-english -- https://master.php.net/note/delete/70066/non-english Del: in docs -- https://master.php.net/note/delete/70066/in+docs Del: other reasons-- https://master.php.net/note/delete/70066 Reject -- https://master.php.net/note/reject/70066 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#117928) next »