1   /*
2    * SPDX-FileCopyrightText: none
3    * SPDX-License-Identifier: CC0-1.0
4    */
5   
6   package dev.metaschema.schemagen;
7   
8   import edu.umd.cs.findbugs.annotations.NonNull;
9   
10  /**
11   * Indicates an unrecoverable error occurred during schema generation.
12   * <p>
13   * This exception is thrown when the schema generator encounters a condition
14   * that prevents it from completing the schema generation process.
15   */
16  public class SchemaGenerationException
17      extends IllegalStateException {
18  
19    /**
20     * the serial version UID.
21     */
22    private static final long serialVersionUID = 1L;
23  
24    /**
25     * Constructs a new schema generation exception with no detail message.
26     */
27    public SchemaGenerationException() {
28      // use defaults
29    }
30  
31    /**
32     * Constructs a new schema generation exception with the specified detail
33     * message and cause.
34     *
35     * @param message
36     *          the detail message providing context about the failure
37     * @param cause
38     *          the underlying cause of the exception
39     */
40    public SchemaGenerationException(String message, @NonNull Throwable cause) {
41      super(message, cause);
42    }
43  
44    /**
45     * Constructs a new schema generation exception with the specified detail
46     * message.
47     *
48     * @param message
49     *          the detail message providing context about the failure
50     */
51    public SchemaGenerationException(String message) {
52      super(message);
53    }
54  
55    /**
56     * Constructs a new schema generation exception with the specified cause.
57     *
58     * @param cause
59     *          the underlying cause of the exception
60     */
61    public SchemaGenerationException(@NonNull Throwable cause) {
62      super(cause);
63    }
64  
65  }