package de.cannamanage.service.exception;

/**
 * Thrown when a cannabis distribution would violate a CanG compliance rule.
 * The {@code code} field identifies which specific rule was violated,
 * enabling the API layer to return structured error responses.
 */
public class QuotaExceededException extends RuntimeException {

    private final QuotaViolationCode code;

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

    public QuotaViolationCode getCode() {
        return code;
    }
}
