#48394 [Bgs]: Error handling example incorrect

From: Date: Tue, 26 May 2009 11:25:13 +0000
Subject: #48394 [Bgs]: Error handling example incorrect
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2310@lists.php.net to get a copy of this message
ID: 48394 User updated by: shangxiao@php.net Reported By: shangxiao@php.net Status: Bogus Bug Type: Documentation problem PHP Version: Irrelevant New Comment: That's pretty confusing. The example lists all the error types and then a comment states "in reality we would only use some of the types" without stating explicitly that it's impossible to use certain types. In the end it's up to you if you want to make it clearer or not, it's neither here nor there for me. Previous Comments: ------------------------------------------------------------------------ [2009-05-26 07:17:54] bjori@php.net The comment mentions this: // in reality the only entries we should // consider are E_WARNING, E_NOTICE, E_USER_ERROR, // E_USER_WARNING and E_USER_NOTICE ------------------------------------------------------------------------ [2009-05-26 03:24:10] shangxiao@php.net Description: ------------ The example in the manual on error handling "Examples" http://www.php.net/manual/en/errorfunc.examples.php shows that all errors can be handled in the error handler. However in the manual page for set_error_handler: The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called. Reproduce code: --------------- --- From manual page: errorfunc.examples --- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48394&edit=1

« previous php.doc.bugs (#2310) next »