View Javadoc
1   package org.djutils.draw;
2   
3   /**
4    * DegenerateLineException is a special type of DrawRuntimeException, that is thrown if a line or line segment is constructed or
5    * simplified to less than two points.
6    * <p>
7    * Copyright (c) 2020-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://djutils.org/docs/current/djutils/licenses.html">DJUTILS License</a>.
9    * </p>
10   * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a>
11   * @author <a href="https://www.tudelft.nl/pknoppers">Peter Knoppers</a>
12   */
13  public class DegenerateLineException extends DrawRuntimeException
14  {
15      /** */
16      private static final long serialVersionUID = 20200828L;
17  
18      /**
19       * Create an empty runtime drawing exception.
20       */
21      public DegenerateLineException()
22      {
23          super();
24      }
25  
26      /**
27       * Create a runtime drawing exception with a custom message.
28       * @param message String; the custom message.
29       */
30      public DegenerateLineException(final String message)
31      {
32          super(message);
33      }
34  
35      /**
36       * Create a runtime drawing exception with an underlying cause.
37       * @param cause Throwable; the cause of this exception to be thrown
38       */
39      public DegenerateLineException(final Throwable cause)
40      {
41          super(cause);
42      }
43  
44      /**
45       * Create a runtime drawing exception with a custom message and an underlying cause.
46       * @param message String; the custom message
47       * @param cause Throwable; the cause of this exception to be thrown
48       */
49      public DegenerateLineException(final String message, final Throwable cause)
50      {
51          super(message, cause);
52      }
53  
54  }