|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-01-10 23:15 UTC] tony2001@php.net
[2005-01-26 05:08 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 24 10:00:01 2025 UTC |
Description: ------------ trigger_error("my message",E_USER_ERROR) reports "my message" as a PHP Notice, not an error, when used inside an exception handler. Reproduce code: --------------- ini_set("error_log","/var/www/html/indigo/weblog"); ini_set("log_errors","1"); ini_set("display_errors","0"); function handleException($e) { trigger_error("EXCEPTION THROWN: " . $e->getMessage(),E_USER_ERROR); // want exception messages to go to same spot as errors Header("Location: bailout.php"); exit; } set_exception_handler("handleException"); Expected result: ---------------- I expected the the error message to be of type E_USER_ERROR, not E_USER_NOTICE.