Re: exceptions instead of errors

From: Date: Sun, 04 May 2003 15:44:06 +0000
Subject: Re: exceptions instead of errors
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-1207@lists.php.net to get a copy of this message
On Sunday, May 4, 2003, at 11:30 AM, Derick Rethans wrote:
On Sat, 3 May 2003, Andi Gutmans wrote:
At 02:53 AM 5/4/2003 +0200, Marcus Börger wrote:
Some help of the engine would be good: - automatically set EH_THROW mode at "try" - automatically set EH_NORMAL mode at "catch" (first outmost catch)
Huh? I think it's definitely not obvious that I'd want these to happen automatically. Actually I personally wouldn't, because I'd prefer PHP to continue the way it works and only use exceptions in user-land.
I don't see a problem with auto-detecting if exceptions should be trown when somebody enters a try { } statement?
This is exactly why I never understood not wanting to throw exceptions instead of E_ERRORs. If you aren't 'using exceptions' (i.e. writing code that uses try{} catch{}), you will still get the same behavior (a fatal termination of the script). If you are programming with exceptions you will get the functionality you almost certainly desire. George

« previous php.internals (#1207) next »