__construct() public method

public __construct ( $errors = null, $message = null )
コード例 #1
0
 public function __construct($errorNo, $errorMessage, $previous = null)
 {
     $this->errNo = $errorNo;
     $this->error = $errorMessage;
     $customMessage = "Error => " . $this->errNo . ": " . $this->error;
     parent::__construct($this->errorNo, $customMessage, $previous);
 }
コード例 #2
0
 public function __construct($mysqlAttributeErrorNo, $mysqlAttributeErrorMessage, $previous = null)
 {
     $this->errNo = $mysqlAttributeErrorNo;
     $this->error = $mysqlAttributeErrorMessage;
     $customMessage = "Error => " . $this->errNo . ": " . $this->error;
     parent::__construct('902', $customMessage, $previous);
 }
コード例 #3
0
 public function __construct($request, $status_code, $description, Exception $previous = null)
 {
     $this->request = $request;
     $this->status_code = $status_code;
     $this->description = $description;
     parent::__construct($description, $status_code, $previous);
 }
コード例 #4
0
 public function __construct($mongoException, $previous = null)
 {
     $errorCode = $customMessage = null;
     if ($mongoException instanceof MongoDuplicateKeyException) {
         throw new DuplicateEntityException();
     } else {
         $errorCode = '800';
         $customMessage = "Exception: Type => " . get_class($mongoException) . ": " . $mongoException->getMessage();
     }
     parent::__construct($errorCode, $customMessage, $previous);
 }
コード例 #5
0
 public function __construct($mysqlErrorNo, $mysqlErrorMessage, $previous = null)
 {
     $this->errNo = $mysqlErrorNo;
     $this->error = $mysqlErrorMessage;
     $errorCode = '900';
     if ($mysqlErrorNo == '1062') {
         throw new DuplicateEntityException();
     } else {
         $customMessage = "MySQL Error => " . $this->errNo . ": " . $this->error;
     }
     parent::__construct($errorCode, $customMessage, $previous);
 }
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct(self::STATUS_CODE, self::ERROR_CODE, self::DEVELOPER_MESSAGE, self::HUMAN_MESSAGE);
 }
コード例 #7
0
 /**
  * BadRequestException constructor.
  * @param string $msg
  * @param string $code
  * @param string $url
  * @param array $meta
  */
 public function __construct($msg = 'Bad Request', $code = '400', $url = '', $meta = [])
 {
     parent::__construct($msg, $code, $url, $meta);
 }
コード例 #8
0
 function __construct($channelAttributeType, $channelAttributeValue, $previous = null)
 {
     parent::__construct('7006', isset($channelAttributeValue) ? "Channel with " . "{$channelAttributeType} '{$channelAttributeValue}' does not exist" : "", $previous);
 }
コード例 #9
0
 /**
  * UnauthorizedException constructor.
  * @param string $msg
  * @param string $code
  * @param string $url
  * @param array $meta
  */
 public function __construct($msg = 'Unauthorized', $code = '401', $url = '', $meta = [])
 {
     parent::__construct($msg, $code, $url, $meta);
 }
コード例 #10
0
 /**
  * InternalServerErrorException constructor.
  * @param string $msg
  * @param string $code
  * @param string $url
  * @param array $meta
  */
 public function __construct($msg = 'Internal Server Error', $code = '500', $url = '', $meta = [])
 {
     parent::__construct($msg, $code, $url, $meta);
 }
コード例 #11
0
 function __construct($orgDataFieldAttributeType = null, $orgDataFieldAttributeValue = null, $previous = null)
 {
     parent::__construct('6204', isset($orgDataFieldAttributeValue) ? "Org-channel-field with " . "{$orgDataFieldAttributeType} '{$orgDataFieldAttributeValue}' does not exist" : "", $previous);
 }
コード例 #12
0
 public function __construct($msg)
 {
     parent::__construct($msg, 14003);
     $this->httpStatusCode = 400;
     $this->errorType = 'invalid_operation';
 }
コード例 #13
0
 function __construct($previous = null)
 {
     parent::__construct('1000', null, $previous);
 }
 public function __construct($message, $badValue)
 {
     parent::__construct($message);
     $this->badValue = $badValue;
 }
コード例 #15
0
 function __construct($customMessage = null, $previous = null)
 {
     parent::__construct('1006', $customMessage, $previous);
 }
コード例 #16
0
 /**
  * ServerUnavailableException constructor.
  * @param string $msg
  * @param string $code
  * @param string $url
  * @param array $meta
  */
 public function __construct($msg = 'Server Unavailable', $code = '503', $url = '', $meta = [])
 {
     parent::__construct($msg, $code, $url, $meta);
 }
コード例 #17
0
 public function __construct($message = 'InvalidParams')
 {
     parent::__construct($message, 400);
 }
コード例 #18
0
 /**
  * SDKValidationException constructor.
  * @param string $msg
  * @param string $code
  * @param string $url
  * @param array $meta
  */
 public function __construct($msg = 'SDK Validation Error', $code = '400', $url = '', $meta = [])
 {
     parent::__construct($msg, $code, $url, $meta);
 }
コード例 #19
0
 public function __construct($message = 'AccessDenied')
 {
     parent::__construct($message, 403);
 }
コード例 #20
0
 /**
  * @param string $msg
  * @param int $code
  * @param int $retryAfter
  */
 public function __construct($msg, $code, $retryAfter = 0)
 {
     $this->retryAfter = $retryAfter;
     return parent::__construct($msg, $code);
 }
コード例 #21
0
 /**
  * @param string $message
  * @param int $code
  * @param SoapClient $soapClient
  * @param Exception $previous
  */
 public function __construct($message, $code, SoapClient $soapClient, Exception $previous = null)
 {
     parent::__construct($message, $code, $previous);
     $this->soapClient = $soapClient;
 }
コード例 #22
0
 function __construct($orgId, $previous = null)
 {
     parent::__construct('6205', isset($orgId) ? "Organization with org_id '{$orgId}' does not exist" : "", $previous);
 }
コード例 #23
0
 public function __construct($message = 'ValidationFailed')
 {
     parent::__construct($message, 400);
 }
コード例 #24
0
ファイル: ValidationFailed.php プロジェクト: superbull/super
 public function __construct($errors)
 {
     parent::__construct('Validation Failed', 422);
     $this->errors = $errors;
 }
コード例 #25
0
 /**
  * @return void
  */
 public function __construct()
 {
     $this->build(func_get_args());
     parent::__construct();
 }
コード例 #26
0
 public function __construct($msg)
 {
     parent::__construct($msg, 14001);
     $this->httpStatusCode = 400;
     $this->errorType = 'invalid_request';
 }
コード例 #27
0
 public function __construct($message = 'Deprecated')
 {
     parent::__construct($message, 405);
 }
コード例 #28
0
 function __construct($dataFieldTypeAttributeType, $dataFieldTypeAttributeValue, $previous = null)
 {
     parent::__construct('4004', isset($dataFieldTypeAttributeValue) ? "Data-Field-Type with " . "{$dataFieldTypeAttributeType} '{$dataFieldTypeAttributeValue}' does not exist" : "", $previous);
 }
コード例 #29
0
 function __construct($customerAttributeType, $customerAttributeValue, $orgId = null, $previous = null)
 {
     parent::__construct('7004', isset($customerAttributeValue) ? "Customer with " . "{$customerAttributeType} '{$customerAttributeValue}' does not exist" . (isset($orgId) ? " in org '{$orgId}'" : "") : "", $previous);
 }
コード例 #30
0
 public function __construct($message = 'NotImplemented')
 {
     parent::__construct($message, 400);
 }