note 103754 added to class.errorexception
| From: | vog at notjusthosting dot com | Date: | Mon, 02 May 2011 12:14:50 +0000 |
| Subject: | note 103754 added to class.errorexception | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179335@lists.php.net to get a copy of this message | ||
There is a contradiction between the class synopsis and the example code.
The class synopsis states that the error code ($code) is the 2nd argument, while the example code
provides the error code ($errno) as the 3rd argument.
Assuming that the class synopsis is correct, the example code should be corrected to:
<?php
function exception_error_handler($errno, $errstr, $errfile, $errline ) {
throw new ErrorException($errstr, $errno, 0, $errfile, $errline);
}
set_error_handler("exception_error_handler");
/* Trigger exception */
strpos();
?>
----
Server IP: 212.124.37.9
Probable Submitter: 88.73.10.221
----
Manual Page -- http://www.php.net/manual/en/class.errorexception.php
Edit -- https://master.php.net/note/edit/103754
Del: integrated -- https://master.php.net/note/delete/103754/integrated
Del: useless -- https://master.php.net/note/delete/103754/useless
Del: bad code -- https://master.php.net/note/delete/103754/bad+code
Del: spam -- https://master.php.net/note/delete/103754/spam
Del: non-english -- https://master.php.net/note/delete/103754/non-english
Del: in docs -- https://master.php.net/note/delete/103754/in+docs
Del: other reasons-- https://master.php.net/note/delete/103754
Reject -- https://master.php.net/note/reject/103754
Search -- https://master.php.net/manage/user-notes.php