src/PeekAndPoke/Aviator/ErrorHandling/DebugErrorHandler.php
public function onShutdown()
    {
        // Did we record an error earlier on?
        if (count($this->errors) > 0) {
            echo $this->errorPage($this->errors);
            exit (-1);
        }

        // Is the shutdown caused by a fatal error ?
        $error = error_get_last();

        // No error so we can just leave
        if ($error === null) {
            return;
        }

        error_clear_last();

        $type     = $error['type'] ?? 'n/a';
        $file     = $error['file'] ?? 'n/a';
        $line     = $error['line'] ?? 'n/a';
        $message  = "Fatal error</b> of type {$type}";
        $traceStr = $error['message'] ?? 'n/a';

        echo $this->errorPage([
            new Error($type, $message, $file, $line, [], $traceStr)
        ]);

        exit(-1);
    }
public function onShutdown()
    {
        // Did we record an error earlier on?
        if (count($this->errors) > 0) {
            echo $this->errorPage($this->errors);
            exit (-1);
        }

        // Is the shutdown caused by a fatal error ?
        $error = error_get_last();

        // No error so we can just leave
        if ($error === null) {
            return;
        }

        error_clear_last();

        $type     = $error['type'] ?? 'n/a';
        $file     = $error['file'] ?? 'n/a';
        $line     = $error['line'] ?? 'n/a';
        $message  = "Fatal error</b> of type {$type}";
        $traceStr = $error['message'] ?? 'n/a';

        echo $this->errorPage([
            new Error($type, $message, $file, $line, [], $traceStr)
        ]);

        exit(-1);
    }
{@inheritdoc}