Re: exceptions instead of errors

From: Date: Tue, 13 May 2003 14:32:33 +0000
Subject: Re: exceptions instead of errors
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-1475@lists.php.net to get a copy of this message
At 16:35 13/05/2003, George Schlossnagle wrote:
The issue though is that almost none of the E_ERRORs in the engine are actually really fatal.
I haven't counted, but there certainly are many that are fatal.
I agree that the issue of things which are currently E_WARNINGs is complex (I personally think they should be handled by wrapper implementations that throw exceptions or vice-versa, but I think that is an issue for a different discussion), but the E_ERROR behavior change is completely clean and does not jeopardize BC at all.
You mean making E_ERROR's throw exceptions? It jeopardizes stability. We can only do it if we introduce the new error level and selectively change existing E_ERRORs to that error level, iff they don't leave the engine (or other parts of the infrastructure) in an unstable state. We also have to change the default extension handler to be slightly smarter and emit an error message identical to the ones that we emit today, with no traces of "exception" in there - people who don't ask for exceptions shouldn't bump into them. Zeev

« previous php.internals (#1475) next »