ze-ph.ErrorMiddleware.php.mustache Maven / Gradle / Ivy
process($request);
ErrorHandler::stop(true);
if (!($result instanceof Response)) {
throw new \RuntimeException(sprintf(
'Invalid response: expecting %s, got %s',
Response::class,
is_object($result)? get_class($result) : gettype($result)
));
}
}
catch (\Exception $error) {
$result = (new \Zend\Diactoros\Response())->withStatus(500, 'Internal server error');
error_log((string)$error);
}
return $result;
}
}