From:             php at bouchery dot com
Operating system: all
PHP version:      Irrelevant
PHP Bug Type:     Feature/Change Request
Bug description:  trigger_error with multi-level error

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 bug report at http://bugs.php.net/?id=26213&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26213&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26213&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26213&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26213&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26213&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26213&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26213&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26213&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26213&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26213&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26213&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26213&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26213&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26213&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26213&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26213&r=float

Reply via email to