Files
UserOnlineStatus/Xboard/app/Exceptions/ApiException.php
CN-JS-HuiBai 2c6a38c80d first commit
2026-04-07 16:54:24 +08:00

24 lines
465 B
PHP

<?php
namespace App\Exceptions;
use Exception;
class ApiException extends Exception
{
protected $code; // 错误码
protected $message; // 错误消息
protected $errors; // 全部错误信息
public function __construct($message = null, $code = 400, $errors = null)
{
$this->message = $message;
$this->code = $code;
$this->errors = $errors;
}
public function errors(){
return $this->errors;
}
}