mateclaw/mateclaw-server/src/main/java/vip/mate/exception/MateClawException.java
matevip 579d60125b Initial commit: MateClaw — Java + Vue 3 AI Assistant System
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
2026-04-04 19:03:49 +08:00

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();
}
}