pimcore-dynamic-search
pimcore-dynamic-search copied to clipboard
[Bug] Cryptic error message due to wrong parameter typehint
Q | A |
---|---|
Branch | master |
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Problem
The SPL class Exception
accepts a \Throwable $previous
exception to be passed in the constructor. Several exceptions from this bundle extend the base exception but only accept \Exception
but not \Error
as type for the $previous
parameter.
Since in some cases also an Error
can be thrown this leads to very cryptic exceptions with "wrong" directives.
Solution
Just adopt the type hint from the base Exception
class to accept a Throwable
.