public function __construct($fieldname, $msg = null)
 {
     $this->fieldname = $fieldname;
     if ($msg === null) {
         // TRANS: Exception text shown when no uploaded media was provided in POST
         // TRANS: %s is the HTML input field name.
         $msg = sprintf(_('There is no uploaded media for input field "%s".'), $this->fieldname);
     }
     parent::__construct($msg, 400);
 }
 /**
  * @param string $clientMessage
  */
 public function __construct($clientMessage)
 {
     parent::__construct(sprintf('The submitted FTP credentials form returned with an error: %s.', empty($clientMessage) ? '(empty)' : $clientMessage));
     $this->clientMessage = $clientMessage;
 }
Exemplo n.º 3
0
 /**
  * Adds an array of parsed message values to the standard exception
  */
 public function __construct(array $parsedMsgArr, $msg, $errno, \Exception $previousException = null)
 {
     $this->parsedMsgArr = $parsedMsgArr;
     /** @noinspection PhpParamsInspection */
     parent::__construct($msg, $errno, $previousException);
 }
 public function __construct(array $errors = [], $message = "", $code = 0, Exception $previous = null)
 {
     $this->errors = $errors;
     parent::__construct(422, $message, $code, $previous);
 }
 /**
  * @param mixed $requestId
  * @param mixed $responseId
  */
 public function __construct($requestId, $responseId)
 {
     $message = "The request and response ID's do not match [\"RequestID\"=>%s, \"ResponseID\"=>%s]";
     $message = sprintf($message, var_export($requestId, true), var_export($responseId, true));
     parent::__construct($message);
 }
Exemplo n.º 6
0
 public function __construct($field)
 {
     parent::__construct(sprintf(self::MESSAGE, $field));
 }
 public function __construct($errorMessage, $errorCode)
 {
     parent::__construct($errorMessage, $errorCode);
     $this->setErrorType("Server");
 }
Exemplo n.º 8
0
 function __construct()
 {
     parent::__construct(array('status_message' => 'No response from server - '));
 }
 public function __construct($number)
 {
     parent::__construct(sprintf(self::MESSAGE, $number));
 }
 function __construct($reason, $retryAfter, $params)
 {
     $this->retryAfter = (int) $retryAfter;
     parent::__construct($reason, 503, null, "MAINTENANCE", $params);
 }
 /**
  * @param int $code
  * @param string $message
  * @param null $data
  */
 public function __construct($code, $message, $data = null)
 {
     parent::__construct($message, $code);
     $this->data = $data;
 }
 public function __construct($qmkey)
 {
     $this->qmkey = $qmkey;
     parent::__construct(_('Bad queue manager key was used.'));
 }
 public function __construct()
 {
     parent::__construct('There is no service available for this expedition.');
 }
Exemplo n.º 14
0
 /**
  * @param string $reason
  */
 public function __construct($reason)
 {
     parent::__construct('Extension installation failed: ' . $reason);
     $this->reason = $reason;
 }
Exemplo n.º 15
0
 /**
  * ServerException constructor.
  * @param string $errorMessage
  * @param string $errorCode
  * @param int $httpStatus
  * @param int $code
  */
 public function __construct($errorMessage, $errorCode, $httpStatus = 0, $code = 0)
 {
     parent::__construct($errorMessage, $errorCode, $httpStatus, $code);
     $this->setErrorType('Server');
 }
Exemplo n.º 16
0
 public function __construct($message = "", $code = 0, Exception $previous = null)
 {
     parent::__construct(410, $message, $code, $previous);
 }
Exemplo n.º 17
0
 /**
  * @param string    $msg
  * @param int       $code
  * @param Exception $previous
  */
 public function __construct($msg = '', $code = 404, Exception $previous = null)
 {
     parent::__construct($msg, $code, $previous);
 }
 public function __construct($retryAfter, $rateLimit = 0, $message = '', $code = 0, Exception $previous = null)
 {
     $this->retryAfter = $retryAfter;
     $this->rateLimit = (int) $rateLimit;
     parent::__construct(429, $message, $code, $previous);
 }
Exemplo n.º 19
0
 /**
  * @param int    $errno  The connection error code
  * @param string $errstr The connection error message
  */
 public function __construct($errno, $errstr)
 {
     parent::__construct(sprintf('Socket error %d: %s', $errno, $errstr));
 }
 /**
  * Constructor
  *
  * @param string $message Message for the exception
  */
 public function __construct($message = null)
 {
     parent::__construct($message, 403);
 }
Exemplo n.º 21
0
 function __construct($msg = null, $code = 400)
 {
     if ($msg === null) {
         $msg = $this->defaultMessage();
     }
     parent::__construct($msg, $code);
 }
 public function __construct($zipCode, $city)
 {
     parent::__construct(sprintf(self::MESSAGE, $zipCode, $city));
 }
 /**
  * Setup the exception
  *
  * @since 2.0
  * @param string $message error message
  * @param int $code HTTP response code
  * @param stdClass $request request class
  * @param stdClass $response response class
  */
 public function __construct($message, $code = 0, $request, $response)
 {
     parent::__construct($message, $code);
     $this->request = $request;
     $this->response = $response;
 }
Exemplo n.º 24
0
 public function __construct($path)
 {
     parent::__construct('Could not find file: ' . $path);
 }