Re: exceptions instead of errors
| From: | George Schlossnagle | Date: | Tue, 13 May 2003 01:41:10 +0000 |
| Subject: | Re: exceptions instead of errors | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-1462@lists.php.net to get a copy of this message | ||
What is the point of having a new error type? How does that differ semantically from just throwing an exception?
The only way I could see something like this working is
exceptions=E_ALL|~E_NOTICE
which would throw an exception on all non-notice errors. I think this would be a Bad Idea though, as it is much less intuitive than throwing exceptions on E_ERROR in a try block or when set_exception_handler has set a final exception handler.
George
On Monday, May 12, 2003, at 08:16 PM, John Coggeshall wrote:
I don't know if anyone has discussed this in any length or not, but what about adding a new error type (E_EXCEPTION)... I'm 100% for the idea of having PHP throw exceptions internally, however there are E_ERRORs that are indeed fatal in their context and shouldn't be caught. If this different error level existed, it could be treated like an E_ERROR if not within a try{} block, however will still preserve the meaning of the error code and give maintainers an opportunity to change their extensions to support exceptions as appropriate. John -- -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- John Coggeshalljohn at coggeshall dot org http://www.coggeshall.org/-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php