001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005 006package dev.metaschema.core.model; 007 008/** 009 * Identifies that an unexpected error occurred while initializing or using a 010 * Metaschema-based model. 011 */ 012public class ModelInitializationException 013 extends IllegalStateException { 014 015 /** 016 * the serial version UID. 017 */ 018 private static final long serialVersionUID = 1L; 019 020 /** 021 * Constructs a new exception with the provided {@code message} and no cause. 022 * 023 * @param message 024 * the exception message 025 */ 026 public ModelInitializationException(String message) { 027 super(message); 028 } 029 030 /** 031 * Constructs a new exception with the provided {@code cause}. 032 * <p> 033 * The message used will be the message provided by the underlying cause. 034 * 035 * @param cause 036 * the original exception cause 037 */ 038 public ModelInitializationException(Throwable cause) { 039 super(cause); 040 } 041 042 /** 043 * Constructs a new exception with the provided {@code message} and 044 * {@code cause}. 045 * 046 * @param message 047 * the exception message 048 * @param cause 049 * the original exception cause 050 */ 051 public ModelInitializationException(String message, Throwable cause) { 052 super(message, cause); 053 } 054}