当前位置: 首页>>代码示例>>PHP>>正文


PHP ApiException::__construct方法代码示例

本文整理汇总了PHP中ApiException::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ApiException::__construct方法的具体用法?PHP ApiException::__construct怎么用?PHP ApiException::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ApiException的用法示例。


在下文中一共展示了ApiException::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 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);
 }
开发者ID:rajnishp,项目名称:bjs,代码行数:7,代码来源:FailedDataFieldValidationException.class.php

示例2: __construct

 public function __construct($mysqlAttributeErrorNo, $mysqlAttributeErrorMessage, $previous = null)
 {
     $this->errNo = $mysqlAttributeErrorNo;
     $this->error = $mysqlAttributeErrorMessage;
     $customMessage = "Error => " . $this->errNo . ": " . $this->error;
     parent::__construct('902', $customMessage, $previous);
 }
开发者ID:rajnishp,项目名称:bjs,代码行数:7,代码来源:InvalidAttributeTypeException.class.php

示例3: __construct

 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);
 }
开发者ID:recombee,项目名称:php-api-client,代码行数:7,代码来源:ResponseException.php

示例4: __construct

 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);
 }
开发者ID:rajnishp,项目名称:bjs,代码行数:11,代码来源:MongoDbException.class.php

示例5: __construct

 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);
 }
开发者ID:rajnishp,项目名称:bjs,代码行数:12,代码来源:MySqlDbException.class.php

示例6: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct(self::STATUS_CODE, self::ERROR_CODE, self::DEVELOPER_MESSAGE, self::HUMAN_MESSAGE);
 }
开发者ID:open-orchestra,项目名称:open-orchestra-base-api-bundle,代码行数:7,代码来源:AuthorizationNonSupportedHttpException.php

示例7: __construct

 /**
  * 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);
 }
开发者ID:Aikidesk,项目名称:www-php-sdk,代码行数:11,代码来源:BadRequestException.php

示例8: isset

 function __construct($channelAttributeType, $channelAttributeValue, $previous = null)
 {
     parent::__construct('7006', isset($channelAttributeValue) ? "Channel with " . "{$channelAttributeType} '{$channelAttributeValue}' does not exist" : "", $previous);
 }
开发者ID:rajnishp,项目名称:bjs,代码行数:4,代码来源:ChannelNotFoundException.class.php

示例9: __construct

 /**
  * 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);
 }
开发者ID:aikidesk,项目名称:instance-php-sdk,代码行数:11,代码来源:UnauthorizedException.php

示例10: __construct

 /**
  * 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);
 }
开发者ID:Aikidesk,项目名称:www-php-sdk,代码行数:11,代码来源:InternalServerErrorException.php

示例11: isset

 function __construct($orgDataFieldAttributeType = null, $orgDataFieldAttributeValue = null, $previous = null)
 {
     parent::__construct('6204', isset($orgDataFieldAttributeValue) ? "Org-channel-field with " . "{$orgDataFieldAttributeType} '{$orgDataFieldAttributeValue}' does not exist" : "", $previous);
 }
开发者ID:rajnishp,项目名称:bjs,代码行数:4,代码来源:OrgDataFieldNotFoundException.class.php

示例12: __construct

 public function __construct($msg)
 {
     parent::__construct($msg, 14003);
     $this->httpStatusCode = 400;
     $this->errorType = 'invalid_operation';
 }
开发者ID:safarishi,项目名称:lts,代码行数:6,代码来源:DuplicateOperateException.php

示例13:

 function __construct($previous = null)
 {
     parent::__construct('1000', null, $previous);
 }
开发者ID:rajnishp,项目名称:bjs,代码行数:4,代码来源:UnauthorizedException.class.php

示例14: __construct

 public function __construct($message, $badValue)
 {
     parent::__construct($message);
     $this->badValue = $badValue;
 }
开发者ID:kojiyamauchi,项目名称:WebPayAndPayPalAPISampleInWordPress,代码行数:5,代码来源:InvalidRequestException.php

示例15:

 function __construct($customMessage = null, $previous = null)
 {
     parent::__construct('1006', $customMessage, $previous);
 }
开发者ID:rajnishp,项目名称:bjs,代码行数:4,代码来源:MalformedRequestDataException.class.php


注:本文中的ApiException::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。