ProbabilityException.java

  1. package org.opentrafficsim.core.distributions;

  2. /**
  3.  * Exception thrown when provided probabilities or frequencies are invalid. Negative probabilities or frequencies are invalid. A
  4.  * set of probabilities or frequencies that adds up to 0 causes this exception when the draw method is called.
  5.  * <p>
  6.  * Copyright (c) 2013-2022 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
  7.  * BSD-style license. See <a href="http://opentrafficsim.org/docs/current/license.html">OpenTrafficSim License</a>.
  8.  * <p>
  9.  * @version $Revision$, $LastChangedDate$, by $Author$, initial version Mar 1, 2016 <br>
  10.  * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
  11.  */
  12. public class ProbabilityException extends Exception
  13. {
  14.     /** */
  15.     private static final long serialVersionUID = 20160301L;

  16.     /**
  17.      *
  18.      */
  19.     public ProbabilityException()
  20.     {
  21.     }

  22.     /**
  23.      * @param message String; String
  24.      */
  25.     public ProbabilityException(final String message)
  26.     {
  27.         super(message);
  28.     }

  29.     /**
  30.      * @param cause Throwable; Throwable
  31.      */
  32.     public ProbabilityException(final Throwable cause)
  33.     {
  34.         super(cause);
  35.     }

  36.     /**
  37.      * @param message String; String
  38.      * @param cause Throwable; Throwable
  39.      */
  40.     public ProbabilityException(final String message, final Throwable cause)
  41.     {
  42.         super(message, cause);
  43.     }

  44.     /**
  45.      * @param message String; description of the problem
  46.      * @param cause Throwable; the cause of this ValueRuntimeException
  47.      * @param enableSuppression boolean; whether or not suppression is enabled or disabled
  48.      * @param writableStackTrace boolean; whether or not the stack trace should be writable
  49.      */
  50.     public ProbabilityException(final String message, final Throwable cause, final boolean enableSuppression,
  51.             final boolean writableStackTrace)
  52.     {
  53.         super(message, cause, enableSuppression, writableStackTrace);
  54.     }
  55. }