本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例8: isset
function __construct($channelAttributeType, $channelAttributeValue, $previous = null)
{
parent::__construct('7006', isset($channelAttributeValue) ? "Channel with " . "{$channelAttributeType} '{$channelAttributeValue}' does not exist" : "", $previous);
}
示例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);
}
示例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);
}
示例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);
}
示例12: __construct
public function __construct($msg)
{
parent::__construct($msg, 14003);
$this->httpStatusCode = 400;
$this->errorType = 'invalid_operation';
}
示例13:
function __construct($previous = null)
{
parent::__construct('1000', null, $previous);
}
示例14: __construct
public function __construct($message, $badValue)
{
parent::__construct($message);
$this->badValue = $badValue;
}
示例15:
function __construct($customMessage = null, $previous = null)
{
parent::__construct('1006', $customMessage, $previous);
}