note 34236 added to function.set-error-handler

From: Date: Sat, 19 Jul 2003 06:50:20 +0000
Subject: note 34236 added to function.set-error-handler
Groups: php.notes 
Request: Send a blank email to php-notes+get-52376@lists.php.net to get a copy of this message
"It only works with the E_USER family of constants." Say you have this code: set_error_handler('myhandler'); function myhandler($msg, $sev) { echo "($sev) $msg<br />"; } trigger_error('doh!', E_ERROR); You will NOT get "(1) doh!" You will get "(2) Invalid error type specified". In other words, PHP takes it upon itself to tell you the constant isn't one it expects and DISCARDS your error message. ---- Manual Page -- http://www.php.net/manual/en/function.set-error-handler.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34236 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34236&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34236&report=yes

« previous php.notes (#52376) next »