protected function callHandler($handler, Exception $exception) { if ($handler instanceof ErrorHandlerInterface) { return $handler->handle($exception); } return call_user_func($handler, $exception); }