Req #26213 [Com]: trigger_error with multi-level error
Edit report at https://bugs.php.net/bug.php?id=26213&edit=1
ID: 26213
Comment by: notdefix at hotmail dot com
Reported by: php at bouchery dot com
Summary: trigger_error with multi-level error
Status: Open
Type: Feature/Change Request
Package: *General Issues
Operating System: *
PHP Version: I*
Block user comment: N
Private report: N
New Comment:
Duplicate for: #47887 ?
Previous Comments:
------------------------------------------------------------------------
[2003-11-12 06:45:41] php at bouchery dot com
Description:
------------
I would like to use trigger_error with an error level like this :
DB_FATAL_ERROR = E_USER_ERROR
XML_FATAL_ERROR = E_USER_ERROR + 1
SOMTHING_FATAL_ERROR = E_USER_ERROR + 2
..etc.
In my error_handler, I'll use these error level to change its behaviour.
It could be a great improvement for error managing to define our user error levels.
Reproduce code:
---------------
<?php
trigger_error( 'My error' , E_USER_ERROR + 1 );
?>
Expected result:
----------------
in error_handler, $errno is equal to "E_USER_ERROR + 1"
Actual result:
--------------
"Warning: Invalid error type specified"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=26213&edit=1
Thread (3 messages)