001/* -*- mode: Java; c-basic-offset: 2; indent-tabs-mode: nil; coding: utf-8-unix -*- 002 * 003 * Copyright © 2023–2024 microBean™. 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with 006 * the License. You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on 011 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the 012 * specific language governing permissions and limitations under the License. 013 */ 014package org.microbean.bean; 015 016/** 017 * A {@link RuntimeException} indicating that an error has occurred in code in this package. 018 * 019 * @author <a href="https://about.me/lairdnelson" target="_top">Laird Nelson</a> 020 */ 021public class BeanException extends RuntimeException { 022 023 024 /* 025 * Static fields. 026 */ 027 028 029 /** 030 * The version of this class for {@linkplain java.io.Serializable serialization} purposes. 031 */ 032 private static final long serialVersionUID = 1L; 033 034 035 /* 036 * Constructors. 037 */ 038 039 040 /** 041 * Creates a new {@link BeanException}. 042 */ 043 public BeanException() { 044 super(); 045 } 046 047 /** 048 * Creates a new {@link BeanException}. 049 * 050 * @param message a detail message; may be {@code null} 051 */ 052 public BeanException(final String message) { 053 super(message); 054 } 055 056 /** 057 * Creates a new {@link BeanException}. 058 * 059 * @param cause a causal {@link Throwable}; may be {@code null} 060 */ 061 public BeanException(final Throwable cause) { 062 super(cause); 063 } 064 065 /** 066 * Creates a new {@link BeanException}. 067 * 068 * @param message a detail message; may be {@code null} 069 * 070 * @param cause a causal {@link Throwable}; may be {@code null} 071 */ 072 public BeanException(final String message, 073 final Throwable cause) { 074 super(message, cause); 075 } 076 077}