You are here

public static function RequestException::wrapException in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/guzzlehttp/guzzle/src/Exception/RequestException.php \GuzzleHttp\Exception\RequestException::wrapException()

Wrap non-RequestExceptions with a RequestException

Parameters

RequestInterface $request:

\Exception $e:

Return value

RequestException

1 call to RequestException::wrapException()
StreamHandler::__invoke in vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
Sends an HTTP request.

File

vendor/guzzlehttp/guzzle/src/Exception/RequestException.php, line 47

Class

RequestException
HTTP Request exception

Namespace

GuzzleHttp\Exception

Code

public static function wrapException(RequestInterface $request, \Exception $e) {
  return $e instanceof RequestException ? $e : new RequestException($e
    ->getMessage(), $request, null, $e);
}