001package gudusoft.gsqlparser.lineage.v2.producer;
002
003/**
004 * A request the SQL-LR producer refuses: an unsupported configuration or input. It carries a stable code so
005 * callers can tell refusals apart without matching message text.
006 *
007 * @since 4.2.17
008 */
009public class SqllrProducerException extends RuntimeException {
010
011    private static final long serialVersionUID = 1L;
012
013    private final String code;
014
015    public SqllrProducerException(String code, String message) {
016        super(code + ": " + message);
017        this.code = code;
018    }
019
020    public SqllrProducerException(String code, String message, Throwable cause) {
021        super(code + ": " + message, cause);
022        this.code = code;
023    }
024
025    /** The stable code of the refusal. */
026    public String getCode() {
027        return code;
028    }
029}