src/main/php/environments/exceptionhandler/AbstractExceptionHandler.php
public function handleException(\Exception $exception)
    {
        if ($this->loggingEnabled) {
            $this->exceptionLogger->log($exception);
        }

        if ('cgi' === $this->sapi) {
            $this->header('Status: 500 Internal Server Error');
        } else {
            $this->header('HTTP/1.1 500 Internal Server Error');
        }

        $this->writeBody($this->createResponseBody($exception));
    }
public function handleException(\Exception $exception)
    {
        if ($this->loggingEnabled) {
            $this->exceptionLogger->log($exception);
        }

        if ('cgi' === $this->sapi) {
            $this->header('Status: 500 Internal Server Error');
        } else {
            $this->header('HTTP/1.1 500 Internal Server Error');
        }

        $this->writeBody($this->createResponseBody($exception));
    }
handles the exception

@param  \Exception  $exception  the uncatched exception