flight\Engine::_error PHP Method

_error() public method

Sends an HTTP 500 response for any errors.
public _error ( object $e )
$e object Thrown exception
    public function _error($e)
    {
        $msg = sprintf('<h1>500 Internal Server Error</h1>' . '<h3>%s (%s)</h3>' . '<pre>%s</pre>', $e->getMessage(), $e->getCode(), $e->getTraceAsString());
        try {
            $this->response(false)->status(500)->write($msg)->send();
        } catch (\Throwable $t) {
            exit($msg);
        } catch (\Exception $ex) {
            exit($msg);
        }
    }