package p.studio.compiler.backend.irvm;

public class IRVMValidationException extends RuntimeException {
    private final IRVMValidationErrorCode code;
    private final int functionIndex;
    private final int pc;

    public IRVMValidationException(
            final IRVMValidationErrorCode code,
            final String message,
            final int functionIndex,
            final int pc) {
        super(message);
        this.code = code;
        this.functionIndex = functionIndex;
        this.pc = pc;
    }

    public IRVMValidationErrorCode code() {
        return code;
    }

    public int functionIndex() {
        return functionIndex;
    }

    public int pc() {
        return pc;
    }
}

