001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005 006package dev.metaschema.schemagen; 007 008import edu.umd.cs.findbugs.annotations.NonNull; 009 010/** 011 * Indicates an unrecoverable error occurred during schema generation. 012 * <p> 013 * This exception is thrown when the schema generator encounters a condition 014 * that prevents it from completing the schema generation process. 015 */ 016public class SchemaGenerationException 017 extends IllegalStateException { 018 019 /** 020 * the serial version UID. 021 */ 022 private static final long serialVersionUID = 1L; 023 024 /** 025 * Constructs a new schema generation exception with no detail message. 026 */ 027 public SchemaGenerationException() { 028 // use defaults 029 } 030 031 /** 032 * Constructs a new schema generation exception with the specified detail 033 * message and cause. 034 * 035 * @param message 036 * the detail message providing context about the failure 037 * @param cause 038 * the underlying cause of the exception 039 */ 040 public SchemaGenerationException(String message, @NonNull Throwable cause) { 041 super(message, cause); 042 } 043 044 /** 045 * Constructs a new schema generation exception with the specified detail 046 * message. 047 * 048 * @param message 049 * the detail message providing context about the failure 050 */ 051 public SchemaGenerationException(String message) { 052 super(message); 053 } 054 055 /** 056 * Constructs a new schema generation exception with the specified cause. 057 * 058 * @param cause 059 * the underlying cause of the exception 060 */ 061 public SchemaGenerationException(@NonNull Throwable cause) { 062 super(cause); 063 } 064 065}