OtsRuntimeException.java

  1. package org.opentrafficsim.base;

  2. /**
  3.  * OtsRuntimeException is a generic runtime exception for the OTS project. Runtime exceptions do ot have to be declared in the
  4.  * header of the method or constructor.
  5.  * <p>
  6.  * Copyright (c) 2022-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
  7.  * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
  8.  * </p>
  9.  * @author <a href="https://github.com/averbraeck">Alexander Verbraeck</a>
  10.  */
  11. public class OtsRuntimeException extends RuntimeException
  12. {
  13.     /** */
  14.     private static final long serialVersionUID = 20220915L;

  15.     /**
  16.      * Create an exception without a message.
  17.      */
  18.     public OtsRuntimeException()
  19.     {
  20.         super();
  21.     }

  22.     /**
  23.      * Create an exception with a message.
  24.      * @param message String; the message to include in the exception
  25.      */
  26.     public OtsRuntimeException(final String message)
  27.     {
  28.         super(message);
  29.     }

  30.     /**
  31.      * Create an exception with an underlying cause.
  32.      * @param cause Throwable; the underlying cause of the exception
  33.      */
  34.     public OtsRuntimeException(final Throwable cause)
  35.     {
  36.         super(cause);
  37.     }

  38.     /**
  39.      * Create an exception with an underlying cause and a message.
  40.      * @param message String; the message to include in the exception
  41.      * @param cause Throwable; the underlying cause of the exception
  42.      */
  43.     public OtsRuntimeException(final String message, final Throwable cause)
  44.     {
  45.         super(message, cause);
  46.     }
  47. }