View Javadoc
1   package org.opentrafficsim.base;
2   
3   /**
4    * OtsRuntimeException is a generic runtime exception for the OTS project. Runtime exceptions do ot have to be declared in the
5    * header of the method or constructor.
6    * <p>
7    * Copyright (c) 2022-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
8    * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
9    * </p>
10   * @author <a href="https://github.com/averbraeck">Alexander Verbraeck</a>
11   */
12  public class OtsRuntimeException extends RuntimeException
13  {
14      /** */
15      private static final long serialVersionUID = 20220915L;
16  
17      /**
18       * Create an exception without a message.
19       */
20      public OtsRuntimeException()
21      {
22          super();
23      }
24  
25      /**
26       * Create an exception with a message.
27       * @param message the message to include in the exception
28       */
29      public OtsRuntimeException(final String message)
30      {
31          super(message);
32      }
33  
34      /**
35       * Create an exception with an underlying cause.
36       * @param cause the underlying cause of the exception
37       */
38      public OtsRuntimeException(final Throwable cause)
39      {
40          super(cause);
41      }
42  
43      /**
44       * Create an exception with an underlying cause and a message.
45       * @param message the message to include in the exception
46       * @param cause the underlying cause of the exception
47       */
48      public OtsRuntimeException(final String message, final Throwable cause)
49      {
50          super(message, cause);
51      }
52  }