Files
huangjingfen/pro_v3.5.1/crmeb/exceptions/PayException.php

27 lines
698 B
PHP
Raw Normal View History

<?php
// +----------------------------------------------------------------------
// | Author: ScottPan Team
// +----------------------------------------------------------------------
namespace crmeb\exceptions;
/**
* Class PayException
* @package crmeb\exceptions
*/
class PayException extends \RuntimeException
{
public function __construct($message = "", $code = 0, Throwable $previous = null)
{
if (is_array($message)) {
$errInfo = $message;
$message = $errInfo[1] ?? '未知错误';
if ($code === 0) {
$code = $errInfo[0] ?? 400;
}
}
parent::__construct($message, $code, $previous);
}
}