001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package dev.metaschema.core.metapath;
007
008/**
009 * An exception to be raised when a Metapath is not a valid instance of the
010 * Metapath grammar.
011 * <p>
012 * This exception is associated with the
013 * {@link StaticMetapathException#INVALID_PATH_GRAMMAR} error code.
014 */
015public class InvalidMetapathGrammarException
016    extends StaticMetapathException {
017
018  /**
019   * the serial version UID.
020   */
021  private static final long serialVersionUID = 2L;
022
023  /**
024   * Constructs a new exception with the provided {@code message} and
025   * {@code cause}.
026   *
027   * @param message
028   *          the exception message
029   * @param cause
030   *          the original exception cause
031   */
032  public InvalidMetapathGrammarException(String message, Throwable cause) {
033    super(INVALID_PATH_GRAMMAR, message, cause);
034  }
035
036  /**
037   * Constructs a new exception with the provided {@code message} and no cause.
038   *
039   * @param message
040   *          the exception message
041   */
042  public InvalidMetapathGrammarException(String message) {
043    super(INVALID_PATH_GRAMMAR, message);
044  }
045
046  /**
047   * Constructs a new exception with no message and the provided {@code cause}.
048   *
049   * @param cause
050   *          the original exception cause
051   */
052  public InvalidMetapathGrammarException(Throwable cause) {
053    super(INVALID_PATH_GRAMMAR, cause);
054  }
055}