note 75035 added to function.set-exception-handler

From: Date: Wed, 09 May 2007 13:59:30 +0000
Subject: note 75035 added to function.set-exception-handler
Groups: php.notes 
Request: Send a blank email to php-notes+get-126362@lists.php.net to get a copy of this message
In my experience, the static keyword is crucial for error handlers which are methods of a class instead of free-standing functions. static function exceptionHandler($exception) works but function exceptionHandler($exception) doesn't and results in a "Fatal error: Exception thrown without a stack frame in Unknown on line 0" message. "public" is optional as it is the default anyway (but it is probably clearer to write it explicitly). ---- Server IP: 194.153.94.10 Probable Submitter: 85.0.156.221 ---- Manual Page -- http://www.php.net/manual/en/function.set-exception-handler.php Edit -- https://master.php.net/note/edit/75035 Del: integrated -- https://master.php.net/note/delete/75035/integrated Del: useless -- https://master.php.net/note/delete/75035/useless Del: bad code -- https://master.php.net/note/delete/75035/bad+code Del: spam -- https://master.php.net/note/delete/75035/spam Del: non-english -- https://master.php.net/note/delete/75035/non-english Del: in docs -- https://master.php.net/note/delete/75035/in+docs Del: other reasons-- https://master.php.net/note/delete/75035 Reject -- https://master.php.net/note/reject/75035 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#126362) next »