protected function _code(Exception $exception)
    {
        $code = 500;

        $exception = $this->_unwrap($exception);
        $errorCode = $exception->getCode();
        if ($errorCode >= 400 && $errorCode < 600) {
            $code = $errorCode;
        }

        return $code;
    }
protected function _code(Exception $exception)
    {
        $code = 500;

        $exception = $this->_unwrap($exception);
        $errorCode = $exception->getCode();
        if ($errorCode >= 400 && $errorCode < 600) {
            $code = $errorCode;
        }

        return $code;
    }
protected function _code ( Exception $ exception ) { $ code = 500 ; $ exception = $ this -> _unwrap ( $ exception ) ; $ errorCode = $ exception -> getCode ( ) ; if ( $ errorCode >= 400 && $ errorCode < 600 ) { $ code = $ errorCode ; } return $ code ; }
Get HTTP status code.

@param \Exception $exception Exception.
@return int A valid HTTP error status code.
Get HTTP status code .