Hi,

On Thu, 2007-10-18 at 11:45 +0400, Antony Dovgal wrote:
> On 17.10.2007 20:09, Lukas Kahwe Smith wrote:
> > Hi,
> > 
> > I remember that we discussed the question of exception throwing from  
> > core in the very early days of php 5, when the suggestion of turning  
> > all errors into exceptions first came up. I remember that we decided  
> > that exceptions should only be thrown from core on constructor errors  
> > by default. Along the lines of PDO, extensions could allow users to  
> > explicitly enable an exception mode.
> 
> First of all, I have to say that I see nothing wrong in using exceptions.
> Second, I see nothing wrong in using exceptions _in OO extensions_.
> And finally, I don't like the idea of having a special function in each and 
> every extension to control it's error level.
> PDO was built this way from the very beginning, but making this some kind of 
> standard would be a mistake IMO.
> 
> You may not like exceptions, but that doesn't make them less useful.

The possibility of changing the error mode at run-time makes it quite
hard to read code. Since you always have to check the error mode of the
object you're currently looking at. Therefore I think we should avoid
adding more of these switches in future - especially on an per-object
basis.

johannes

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to