메소드 | 설명 | |
---|---|---|
__construct ( $message, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response = null, Exception $previous = null, array $handlerContext = [] ) | ||
create ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response = null, Exception $previous = null, array $ctx = [] ) : self | Factory method to create a new exception with a normalized error message | |
getHandlerContext ( ) : array | Get contextual information about the error from the underlying handler. | |
getRequest ( ) : Psr\Http\Message\RequestInterface | Get the request that caused the exception | |
getResponse ( ) : Psr\Http\Message\ResponseInterface | null | Get the associated response | |
getResponseBodySummary ( Psr\Http\Message\ResponseInterface $response ) : string | null | Get a short summary of the response | |
hasResponse ( ) : boolean | Check if a response was received | |
wrapException ( Psr\Http\Message\RequestInterface $request, Exception $e ) : |
Wrap non-RequestExceptions with a RequestException |
메소드 | 설명 | |
---|---|---|
obfuscateUri ( Psr\Http\Message\UriInterface $uri ) : Psr\Http\Message\UriInterface | Obfuscates URI if there is an username and a password present |
public __construct ( $message, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response = null, Exception $previous = null, array $handlerContext = [] ) | ||
$request | Psr\Http\Message\RequestInterface | |
$response | Psr\Http\Message\ResponseInterface | |
$previous | Exception | |
$handlerContext | array |
public static create ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response = null, Exception $previous = null, array $ctx = [] ) : self | ||
$request | Psr\Http\Message\RequestInterface | Request |
$response | Psr\Http\Message\ResponseInterface | Response received |
$previous | Exception | Previous exception |
$ctx | array | Optional handler context. |
리턴 | self |
public getHandlerContext ( ) : array | ||
리턴 | array |
public getRequest ( ) : Psr\Http\Message\RequestInterface | ||
리턴 | Psr\Http\Message\RequestInterface |
public getResponse ( ) : Psr\Http\Message\ResponseInterface | null | ||
리턴 | Psr\Http\Message\ResponseInterface | null |
public static getResponseBodySummary ( Psr\Http\Message\ResponseInterface $response ) : string | null | ||
$response | Psr\Http\Message\ResponseInterface | |
리턴 | string | null |
public static wrapException ( Psr\Http\Message\RequestInterface $request, Exception $e ) : |
||
$request | Psr\Http\Message\RequestInterface | |
$e | Exception | |
리턴 |