You are here

public function RestException::__construct in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 src/Rest/RestException.php \Drupal\salesforce\Rest\RestException::__construct()
  2. 5.0.x src/Rest/RestException.php \Drupal\salesforce\Rest\RestException::__construct()

RestException constructor.

Parameters

\Psr\Http\Message\ResponseInterface|null $response: A response, if available.

string $message: Message (optional).

int $code: Erorr code (optional).

\Exception|null $previous: Previous exception (optional).

File

src/Rest/RestException.php, line 41

Class

RestException
Class RestException.

Namespace

Drupal\salesforce\Rest

Code

public function __construct(ResponseInterface $response = NULL, $message = "", $code = 0, \Exception $previous = NULL) {
  $this->response = $response;
  $message .= $this
    ->getResponseBody();
  parent::__construct($message, $code, $previous);
}