View Javadoc
1   /*
2    * Copyright (c) 2021 Kaiserpfalz EDV-Service, Roland T. Lichti.
3    *
4    * This program is free software: you can redistribute it and/or modify
5    * it under the terms of the GNU General Public License as published by
6    * the Free Software Foundation, either version 3 of the License, or
7    * (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program.  If not, see <https://www.gnu.org/licenses/>.
16   */
17  
18  package de.kaiserpfalzedv.rpg.core.api;
19  
20  import de.kaiserpfalzedv.commons.api.BaseSystemException;
21  import lombok.ToString;
22  
23  /**
24   * The base class for all unchecked exceptions of the KP RPG Services
25   *
26   * @author klenkes74 {@literal <rlichti@kaiserpfalz-edv.de>}
27   * @since 1.0.0 2021-01-08
28   */
29  @ToString(callSuper = true)
30  public abstract class RPGBaseSystemException extends BaseSystemException {
31      /**
32       * Constructs a new exception with the specified detail message.  The
33       * cause is not initialized, and may subsequently be initialized by
34       * a call to {@link #initCause}.
35       *
36       * @param   message   the detail message. The detail message is saved for
37       *          later retrieval by the {@link #getMessage()} method.
38       * @since 1.0.0
39       */
40      @SuppressWarnings("CdiInjectionPointsInspection")
41      public RPGBaseSystemException(final String message) {
42          super(message);
43      }
44  
45      /**
46       * Constructs a new exception with the specified detail message and
47       * cause.  <p>Note that the detail message associated with
48       * {@code cause} is <i>not</i> automatically incorporated in
49       * this exception's detail message.
50       *
51       * @param  message the detail message (which is saved for later retrieval
52       *         by the {@link #getMessage()} method).
53       * @param  cause the cause (which is saved for later retrieval by the
54       *         {@link #getCause()} method).  (A {@code null} value is
55       *         permitted, and indicates that the cause is nonexistent or
56       *         unknown.)
57       * @since  1.0.0
58       */
59      public RPGBaseSystemException(final String message, final Throwable cause) {
60          super(message, cause);
61      }
62  
63      /**
64       * Constructs a new exception with the specified cause and a detail
65       * message of {@code (cause==null ? null : cause.toString())} (which
66       * typically contains the class and detail message of {@code cause}).
67       * This constructor is useful for exceptions that are little more than
68       * wrappers for other throwables (for example, {@link
69       * java.security.PrivilegedActionException}).
70       *
71       * @param  cause the cause (which is saved for later retrieval by the
72       *         {@link #getCause()} method).  (A {@code null} value is
73       *         permitted, and indicates that the cause is nonexistent or
74       *         unknown.)
75       * @since  1.0.0
76       */
77      public RPGBaseSystemException(final Throwable cause) {
78          super(cause);
79      }
80  
81      /**
82       * Constructs a new exception with the specified detail message, cause, suppression enabled or disabled, and
83       * writable stack trace enabled or disabled.
84       *
85       * @param  message the detail message.
86       * @param cause the cause.  (A {@code null} value is permitted,
87       * and indicates that the cause is nonexistent or unknown.)
88       * @param enableSuppression whether or not suppression is enabled
89       *                          or disabled
90       * @param writableStackTrace whether or not the stack trace should
91       *                           be writable
92       * @since 1.0.0
93       */
94      public RPGBaseSystemException(final String message, final Throwable cause, final boolean enableSuppression, final boolean writableStackTrace) {
95          super(message, cause, enableSuppression, writableStackTrace);
96      }
97  }