예제 #1
0
 /**
  * Exception constructor.
  * @param string            $message
  * @param ResponseInterface $response
  * @param int               $code
  * @param Exception|null    $previous
  */
 public function __construct($message, ResponseInterface $response, $code = 0, Exception $previous = null)
 {
     $this->response = $response;
     parent::__construct($message, $code, $previous);
 }
예제 #2
0
 /**
  * HttpException constructor.
  * @param ResponseInterface $response
  * @param Exception|null    $previous
  */
 public function __construct(ResponseInterface $response, Exception $previous = null)
 {
     $message = 'HTTP Error communicating with API: ' . $response->getStatusCode();
     parent::__construct($message, $response, $response->getStatusCode(), $previous);
 }