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
Hey,
Imho TypeException may not be best name for
it, as it's also thrown for non-type related error conditions, like
mismatched argument count.
Would SignatureException be a more apt name for these error conditions?
-Tom
Am 30.03.2015 um 12:58 schrieb Thomas Punt:
Hey,
Imho TypeException may not be best name for
it, as it's also thrown for non-type related error conditions, like
mismatched argument count.
Would SignatureException be a more apt name for these error conditions?
We already have an InvalidArgumentException but this one extends
LogicException extends Exception-Tom