/** * Override default constructor to add ability to set $errors. * * @param string $message * @param int $code * @param Exception|null $previous * @param [{string, string}] errors List of errors returned in an HTTP * response. Defaults to []. */ public function __construct($message, $code = 0, Exception $previous = null, $errors = array()) { if (version_compare(PHP_VERSION, '5.3.0') >= 0) { parent::__construct($message, $code, $previous); } else { parent::__construct($message, $code); } $this->errors = $errors; }
/** * Creates a new IO exception with an optional retry map. * * @param string $message * @param int $code * @param Exception|null $previous * @param array|null $retryMap Map of errors with retry counts. */ public function __construct($message, $code = 0, Exception $previous = null, array $retryMap = null) { if (version_compare(PHP_VERSION, '5.3.0') >= 0) { parent::__construct($message, $code, $previous); } else { parent::__construct($message, $code); } if (is_array($retryMap)) { $this->retryMap = $retryMap; } }
/** * Override default constructor to add ability to set $errors. * * @param string $message * @param int $code * @param Exception|null $previous * @param [{string, string}] errors List of errors returned in an HTTP * response. Defaults to []. */ public function __construct($message, $code = 0, Exception $previous = null, $errors = array()) { parent::__construct($message, $code, $previous); $this->errors = $errors; }