mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-17 20:55:29 +08:00
Full-stack AI assistant built on Spring AI Alibaba. Features: ReAct Agent, Plan-and-Execute, MCP Protocol, Multi-Model, Multi-Channel. Apache-2.0 License
31 lines
608 B
Java
31 lines
608 B
Java
package vip.mate.exception;
|
|
|
|
import lombok.Getter;
|
|
import vip.mate.common.result.ResultCode;
|
|
|
|
/**
|
|
* MateClaw 业务异常
|
|
*
|
|
* @author MateClaw Team
|
|
*/
|
|
@Getter
|
|
public class MateClawException extends RuntimeException {
|
|
|
|
private final int code;
|
|
|
|
public MateClawException(String message) {
|
|
super(message);
|
|
this.code = 500;
|
|
}
|
|
|
|
public MateClawException(int code, String message) {
|
|
super(message);
|
|
this.code = code;
|
|
}
|
|
|
|
public MateClawException(ResultCode resultCode) {
|
|
super(resultCode.getMsg());
|
|
this.code = resultCode.getCode();
|
|
}
|
|
}
|