mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-01-22 10:38:14 -05:00
24 lines
465 B
PHP
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;
|
|
}
|
|
|
|
}
|