public function getResponseError($e, array $headers = [])
    {
        $code = false;

        if ($e instanceof Exception) {
            $code = $e->getCode();
        } elseif (is_numeric($e)) {
            $code = (int)$e;
        }

        if (!$code || $code < 400 || $code > 599) {
            $code = self::HTTP_SERVER_ERROR;
        }

        return $this->getHttpResponse($code, $headers);
    }
public function getResponseError($e, array $headers = [])
    {
        $code = false;

        if ($e instanceof Exception) {
            $code = $e->getCode();
        } elseif (is_numeric($e)) {
            $code = (int)$e;
        }

        if (!$code || $code < 400 || $code > 599) {
            $code = self::HTTP_SERVER_ERROR;
        }

        return $this->getHttpResponse($code, $headers);
    }
public function getResponseError ( $ e , array $ headers = [ ] ) { $ code = false ; if ( $ e instanceof Exception ) { $ code = $ e -> getCode ( ) ; } elseif ( is_numeric ( $ e ) ) { $ code = ( int ) $ e ; } if ( ! $ code || $ code < 400 || $ code > 599 ) { $ code = self :: HTTP_SERVER_ERROR ; } return $ this -> getHttpResponse ( $ code , $ headers ) ; }
Gets a response to an error in the handshake

@param int|Exception $e Exception or HTTP error
@param array         $headers
@return string
Gets a response to an error in the handshake