package com.gzzm.lobster.common;

/**
 * 大龙虾统一异常 / Root exception for all Big Lobster runtime errors.
 *
 * <p>区分运行时治理类错误（配额/熔断/权限）与真正的系统异常。
 * Distinguishes governance errors (quota / circuit breaker / permission)
 * from genuine system-level failures.
 */
public class LobsterException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private final String code;

    public LobsterException(String code, String message) {
        super(message);
        this.code = code;
    }

    public LobsterException(String code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public String getCode() {
        return code;
    }
}
