jingcai-php/app/Exceptions/JingCaiException.php

26 lines
562 B
PHP
Executable File

<?php
namespace App\Exceptions;
use App\Utils\Result;
class JingCaiException extends \RuntimeException
{
public static function create($msg, $code = Result::FAILED, $previous = null)
{
return new static($msg, $code, $previous);
}
/**
* @param $msg
* @param int $code
* @param null $previous
*
* @throws \Throwable
*/
public static function throwJingcai($msg, $code = Result::FAILED, $previous = null) {
$exec = JingCaiException::create($msg, $code, $previous);
throw $exec;
}
}