Recently ported to php7. The following error has occurred:
argument 1 passed to MyClass\Throwable::exceptionHandler() must be an instance of Exception, instance of Error given
And the corresponding class
namespace MyClass;
class Throwable
{
public function exceptionHandler(\Exception $exception)
{
}
}
As stated in the docs
now most errors are logged by throwing exception exceptions.
Does this mean that I have to provide an instance Error
or even more general Throwable
for the exception handler?
source
share