Exception hierarchy: open issues

From: Date: Mon, 30 Mar 2015 10:19:17 +0000
Subject: Exception hierarchy: open issues
Groups: php.internals 
Request: Send a blank email to internals+get-85546@lists.php.net to get a copy of this message
Hi internals! There are a number of open issues with regard to the exception hierarchy for recently introduced exception, for which I would like to open a new thread: * Naming and classiness of BaseException. There's an RFC to change this to a Throwable interface: https://wiki.php.net/rfc/throwable - If we want to move forward with that, it needs a patch, as turning it into an interface likely has non-trivial consequences that need to be addressed in the RFC. * Expectations introduced an AssertionException. Currently it extends Exception. Should it extend BaseException instead, as you usually should not catch assertion exceptions? This was discussed in the RFC thread, but the decision was postponed until engine exceptions land, which has happened by now. * The scalar type hints implementation added a TypeException extends EngineException. We didn't discuss this on-list, so I'd like to bring this up in case anyone disagrees. Imho TypeException may not be best name for it, as it's also thrown for non-type related error conditions, like mismatched argument count. Thanks, Nikita

« previous php.internals (#85546) next »