MIR1503
InvalidCatch
A catch block specifies a type that does not implement the Throwable interface. Only
Throwable and its descendants (Exception, Error, and their subclasses) can be caught.
Example
Section titled “Example”<?phpclass NotAnException {}
try { doSomething();} catch (NotAnException $e) { // NotAnException is not Throwable // unreachable}How to fix
Section titled “How to fix”Only catch classes that implement Throwable. If NotAnException is meant to represent an
error condition, make it extend \Exception or \RuntimeException.