1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package gov.nist.secauto.metaschema.core.metapath;
7   
8   /**
9    * An exception to be raised when a Metapath is not a valid instance of the
10   * Metapath grammar.
11   * <p>
12   * This exception is associated with the
13   * {@link StaticMetapathException#INVALID_PATH_GRAMMAR} error code.
14   */
15  public class InvalidMetapathGrammarException
16      extends StaticMetapathException {
17  
18    /**
19     * the serial version UID.
20     */
21    private static final long serialVersionUID = 2L;
22  
23    /**
24     * Constructs a new exception with the provided {@code message} and
25     * {@code cause}.
26     *
27     * @param message
28     *          the exception message
29     * @param cause
30     *          the original exception cause
31     */
32    public InvalidMetapathGrammarException(String message, Throwable cause) {
33      super(INVALID_PATH_GRAMMAR, message, cause);
34    }
35  
36    /**
37     * Constructs a new exception with the provided {@code message} and no cause.
38     *
39     * @param message
40     *          the exception message
41     */
42    public InvalidMetapathGrammarException(String message) {
43      super(INVALID_PATH_GRAMMAR, message);
44    }
45  
46    /**
47     * Constructs a new exception with no message and the provided {@code cause}.
48     *
49     * @param cause
50     *          the original exception cause
51     */
52    public InvalidMetapathGrammarException(Throwable cause) {
53      super(INVALID_PATH_GRAMMAR, cause);
54    }
55  }