1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package dev.metaschema.core.metapath.function;
7   
8   /**
9    * FORG0001: Thrown when a cast operation fails because the supplied value
10   * cannot be converted to the target datatype.
11   */
12  public class InvalidValueForCastFunctionException
13      extends InvalidArgumentFunctionException {
14  
15    /**
16     * the serial version UUID.
17     */
18    private static final long serialVersionUID = 1L;
19  
20    /**
21     * Constructs a new exception with the provided {@code message} and no cause.
22     *
23     * @param message
24     *          the exception message
25     */
26    public InvalidValueForCastFunctionException(String message) {
27      super(INVALID_VALUE_FOR_CAST, message);
28    }
29  
30    /**
31     * Constructs a new exception with the provided {@code message} and
32     * {@code cause}.
33     *
34     * @param message
35     *          the exception message
36     * @param cause
37     *          the original exception cause
38     */
39    public InvalidValueForCastFunctionException(String message, Throwable cause) {
40      super(INVALID_VALUE_FOR_CAST, message, cause);
41    }
42  
43    /**
44     * Constructs a new exception with no message and the provided {@code cause}.
45     *
46     * @param cause
47     *          the original exception cause
48     */
49    public InvalidValueForCastFunctionException(Throwable cause) {
50      super(INVALID_VALUE_FOR_CAST, cause);
51    }
52  
53  }