protected function getExceptionMessage(\Exception $exception, $statusCode = null)
    {
        $showMessage = $this->messagesMap->resolveException($exception);

        if ($showMessage || $this->debug) {
            return $exception->getMessage();
        }

        return array_key_exists($statusCode, Response::$statusTexts) ? Response::$statusTexts[$statusCode] : 'error';
    }
protected function getExceptionMessage(\Exception $exception, $statusCode = null)
    {
        $showMessage = $this->messagesMap->resolveException($exception);

        if ($showMessage || $this->debug) {
            return $exception->getMessage();
        }

        return array_key_exists($statusCode, Response::$statusTexts) ? Response::$statusTexts[$statusCode] : 'error';
    }
protected function getExceptionMessage ( \ Exception $ exception , $ statusCode = null ) { $ showMessage = $ this -> messagesMap -> resolveException ( $ exception ) ; if ( $ showMessage || $ this -> debug ) { return $ exception -> getMessage ( ) ; } return array_key_exists ( $ statusCode , Response :: $ statusTexts ) ? Response :: $ statusTexts [ $ statusCode ] : 'error' ; }
Extracts the exception message.

@param \Exception $exception
@param int|null   $statusCode

@return string
Extracts the exception message .