ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
### ApiException() <br> 用于抛出错误异常,可以传入三个参数 * msg 状态消息 * errorCode 错误码 * statusCode 状态码 默认: ``` (msg = '请求错误',errorCode = 30000,statusCode = 400) ``` 示例: ``` const Controller = require('think-js-lib').Controller class HelloController extends Controller{ sayHello(){ return this.ApiException() } } ``` 返回: ``` { "msg": "请求错误", "errorCode": 30000 } ```