#48394 [Bgs]: Error handling example incorrect

From: Date: Tue, 26 May 2009 11:38:12 +0000
Subject: #48394 [Bgs]: Error handling example incorrect
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2312@lists.php.net to get a copy of this message
 ID:          48394
 Updated by:  bjori@php.net
 Reported By: shangxiao@php.net
 Status:      Bogus
 Bug Type:    Documentation problem
 PHP Version: Irrelevant
 New Comment:

As a member of php.net you know how things work:
 Suggest a specific change (preferably with patch) if you find things
to be unclear.
It is very clear to me so I can't think of a way to improve it without
a lot of useless info which are documented in detail elsewhere.


Previous Comments:
------------------------------------------------------------------------

[2009-05-26 11:25:13] shangxiao@php.net

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.

------------------------------------------------------------------------

[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



Thread (4 messages)

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