/** * Extended Exception constructor. * * @param string $requestMethod Request method * @param string $requestUrl Request URL * @param array $requestData Request data * @param Response $response Response */ public function __construct($requestMethod, $requestUrl, array $requestData, Response $response) { $this->requestMethod = $requestMethod; $this->requestUrl = $requestUrl; $this->requestData = $requestData; $this->response = $response; $this->message = 'Error occured when sending request.'; parent::__construct($this->message, 0, null); }
/** * Extended Exception constructor. * * @param string $message Error message * @param mixed $argumentValue Argument value * @param int $code Error code * @param \Exception|null $previous Previous exception */ public function __construct($message, $argumentValue, $code = 0, \Exception $previous = null) { $this->argumentValue = $argumentValue; parent::__construct($message, $code, $previous); }