src/Base/ErrorHandler.php
public function handleException($exception)
    {
        $this->exception = $exception;

        try {
            $this->logException($exception);
            if ($this->discardExistingOutput) {
                $this->clearOutput();
            }
            return $this->renderException($exception);
        } catch (\Exception $e) {
            // an other exception could be thrown while displaying the exception
            $this->handleFallbackExceptionMessage($e, $exception);
        } catch (\Throwable $e) {
            // additional check for \Throwable introduced in PHP 7
            $this->handleFallbackExceptionMessage($e, $exception);
        }

        $this->exception = null;
        return new Reaction\Web\Response(500, [], 'Server error');
    }
public function handleException($exception)
    {
        $this->exception = $exception;

        try {
            $this->logException($exception);
            if ($this->discardExistingOutput) {
                $this->clearOutput();
            }
            return $this->renderException($exception);
        } catch (\Exception $e) {
            // an other exception could be thrown while displaying the exception
            $this->handleFallbackExceptionMessage($e, $exception);
        } catch (\Throwable $e) {
            // additional check for \Throwable introduced in PHP 7
            $this->handleFallbackExceptionMessage($e, $exception);
        }

        $this->exception = null;
        return new Reaction\Web\Response(500, [], 'Server error');
    }
Handles uncaught PHP exceptions.

This method is implemented as a PHP exception handler.

@param \Exception $exception the exception that is not caught
@return Reaction\Web\Response