Re: [VOTE] Exceptions in the engine

From: Date: Sun, 17 May 2015 13:22:59 +0000
Subject: Re: [VOTE] Exceptions in the engine
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.internals 
Request: Send a blank email to internals+get-86289@lists.php.net to get a copy of this message
On 17 May 2015 00:48:07 BST, Levi Morrison <levim@php.net> wrote: >It's also the principle of least astonishment: why isn't TypeException >caught by catch (Exception $e)? This is probably a good argument in favour of "Error" as naming for engine exceptions. If you say "TypeError is not caught by catch (Exception $e)", it seems a lot less surprising. You can even say "a TypeError is Throwable, but it's not an Exception". On a practical level, it's perfectly possible to write a handling function which can process all sorts of different user land exceptions, but wouldn't have a clue what to do about an engine error. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#86289) next »