public function __construct($code, $jsonResponse) { $jsonError = "Unknown"; switch ($code) { case JSON_ERROR_NONE: $jsonError = 'No errors'; break; case JSON_ERROR_DEPTH: $jsonError = 'Maximum stack depth exceeded'; break; case JSON_ERROR_STATE_MISMATCH: $jsonError = 'Underflow or the modes mismatch'; break; case JSON_ERROR_CTRL_CHAR: $jsonError = 'Unexpected control character found'; break; case JSON_ERROR_SYNTAX: $jsonError = 'Syntax error, malformed JSON'; break; case JSON_ERROR_UTF8: $jsonError = 'Malformed UTF-8 characters, possibly incorrectly encoded'; break; } $this->rawString = $jsonResponse; parent::__construct("Json Decode Error ({$jsonError}) For : {$jsonResponse}", $code); }
/** * Creates a new exception * * @param string $invalidSetting The name of the invalid setting * @param string $details Optional additional details of the exception */ public function __construct($invalidSetting, $details = '') { $this->invalidSetting = $invalidSetting; $message = 'This setting has an invalid value: ' . $invalidSetting; $message .= strlen($details) ? '. ' . $details : ''; parent::__construct($message); }
public function __construct($calculatedMac, $expected, $rawJson) { parent::__construct("Got {$calculatedMac} and expected {$expected}: {$rawJson}"); }
public function __construct($message = "PDO Service Unavailable", $code = Response::STATUS_CODE_503, \Exception $previous = null) { parent::__construct($message, $code, $previous); }
/** * Constructs a new IllegalArgumentException object. * * @param * string exception message * @param * int user defined exception code */ public function __construct($message = NULL, $code = 0) { parent::__construct($message, $code); }
/** * @param int $errorCode * @param string $errorMessage * @param string $argumentName * @param string $responseString */ public function __construct($errorCode, $errorMessage, $argumentName, $responseString) { $this->argumentName = $argumentName; parent::__construct($errorCode, $errorMessage, $responseString); }
public function __construct($calculated, $sentMac, array $data) { $string = json_encode($data); parent::__construct("Mac Validation Error Expected {$sentMac} got {$calculated} Data: " . $string); }
/** * @param string $message * @param int $code * @param \Throwable $previous */ public function __construct($message = '', $code = 0, \Throwable $previous = null) { parent::__construct($message, $code, $previous); }
public function __construct($message = "The resource doesn't support the specified HTTP verb.", $code = Response::STATUS_CODE_405, \Exception $previous = null) { parent::__construct($message, $code, $previous); }
/** * @param string $missingSetting */ public function __construct($missingSetting) { $this->missingSetting = $missingSetting; parent::__construct('A required setting is missing: ' . $missingSetting); }
public function __construct($url) { parent::__construct("URL is invalid: " . $url); }
/** * Slight reordering of arguments from abstract. * * @param null $data * @param string $message * @param null $code */ public function __construct($data = null, $message = 'Parse error', $code = -32700) { parent::__construct($message, $code, $data); }
/** * Construct Exception * * @param \Elastica\Response $response */ public function __construct(Response $response) { $this->_response = $response; parent::__construct('Error in one or more bulk request actions'); }
public function __construct() { parent::__construct("Request Object has not been set or is invalid"); }
public function __construct($message = 'The specified resource does not exist.', $code = Response::STATUS_CODE_404, \Exception $previous = null) { parent::__construct($message, $code, $previous); }
public function __construct($httpCode, $rawReponse) { parent::__construct("Non expected http code: " . $httpCode, $httpCode, $rawReponse, null, $httpCode); }
/** * Construct Exception * * @param \Elastica\Request $request * @param \Elastica\Response $response */ public function __construct(Request $request, Response $response) { $this->_request = $request; $this->_response = $response; parent::__construct($response->getError()); }
public function __construct($vailidationResults) { $this->vailidationResults = $vailidationResults; parent::__construct("Validation did not pass"); }
public function __construct($message = "Authorization Required", $code = Response::STATUS_CODE_401, \Exception $previous = null) { parent::__construct($message, $code, $previous); }
public function __construct($filePath = '') { parent::__construct("File Could not be found: " . $filePath); }
/** * Constructor * * @param String $message * @param Integer $code * @param String $host * @param String $database */ public function __construct($message, $code, $host, $database) { parent::__construct($message, $code); $this->_host = $host; $this->_database = $database; }
public function __construct($params) { parent::__construct("The following parameters were not provided or are empty: " . $params); }
public function __construct($message = "", \Exception $previous = null) { parent::__construct($message, 500, $previous); }
/** * Constructor * * @param String $message Error message * @param Integer|null $code Error code * @param String|null $query The sql query that caused the error */ public function __construct($message, $code = null, $query = null) { parent::__construct($message, $code); $this->_query = $query; }
/** * Construct Exception * * @param string $message Message * @param \Elastica\Request $request * @param \Elastica\Response $response */ public function __construct($message, Request $request = null, Response $response = null) { $this->_request = $request; $this->_response = $response; parent::__construct($message); }
public function __construct($message = 'Bad Request', $code = Response::STATUS_CODE_400, \Exception $previous = null) { parent::__construct($message, $code, $previous); }
public function __construct($curlErrorMessage, $curlErrorCode, $rawResponse) { parent::__construct($curlErrorMessage, $curlErrorCode, $rawResponse); }