All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ze-ph.ErrorMiddleware.php.mustache Maven / Gradle / Ivy

There is a newer version: 7.8.0
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy