FW: [PHP-DEV] error handling

From: Date: Mon, 18 Nov 2002 10:07:45 +0000
Subject: FW: [PHP-DEV] error handling
Groups: php.dev 
Request: Send a blank email to php-dev+get-91234@lists.php.net to get a copy of this message
This is what I sent Derick about a possible method of implementing a custom error handler for E_PARSE, etc... Free to flame if I'm off base here :) >-----Original Message----- >From: John Coggeshall [mailto:john@coggeshall.org] >Sent: Monday, November 18, 2002 3:52 AM >To: 'Derick Rethans' >Subject: RE: [PHP-DEV] error handling > > > >>Core errors are _fatal_ because it leaves the engine in an unclean >>state. If you have a parse error then the script hasn't been parsed >>fully and thus the compilation step did not even interpreted >>the tokens >>generated by the parse, so how do you want PHP to execute a >>function then? > >Well, in order for it to work you'd have to be prepared to >parse the Error function completely on its own merit... How >about this... > >Create a configuration directive error_handler which accepts >one of Two values... Either a PHP script (like auto_prepend) >which is responsible For dealing with any (and all) errors >which occur, or 'internal' which is Of course the internal PHP >handler.. Then, upon script execution if there Is a >error_handler script that gets executed and parsed first. If >no core Errors occur during the parse/execution of the error >handler script then shouldn't The engine be capiable of >executing that script upon an error somewhere else? > >John

« previous php.dev (#91234) next »