1 package org.opentrafficsim.core.distributions;
2
3 /**
4 * Exception thrown when provided probabilities or frequencies are invalid. Negative probabilities or frequencies are invalid. A
5 * set of probabilities or frequencies that adds up to 0 causes this exception when the draw method is called.
6 * <p>
7 * Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
8 * BSD-style license. See <a href="http://opentrafficsim.org/docs/current/license.html">OpenTrafficSim License</a>.
9 * <p>
10 * @version $Revision$, $LastChangedDate$, by $Author$, initial version Mar 1, 2016 <br>
11 * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
12 */
13 public class ProbabilityException extends Exception
14 {
15 /** */
16 private static final long serialVersionUID = 20160301L;
17
18 /**
19 *
20 */
21 public ProbabilityException()
22 {
23 }
24
25 /**
26 * @param message String; String
27 */
28 public ProbabilityException(final String message)
29 {
30 super(message);
31 }
32
33 /**
34 * @param cause Throwable; Throwable
35 */
36 public ProbabilityException(final Throwable cause)
37 {
38 super(cause);
39 }
40
41 /**
42 * @param message String; String
43 * @param cause Throwable; Throwable
44 */
45 public ProbabilityException(final String message, final Throwable cause)
46 {
47 super(message, cause);
48 }
49
50 /**
51 * @param message String; description of the problem
52 * @param cause Throwable; the cause of this ValueRuntimeException
53 * @param enableSuppression boolean; whether or not suppression is enabled or disabled
54 * @param writableStackTrace boolean; whether or not the stack trace should be writable
55 */
56 public ProbabilityException(final String message, final Throwable cause, final boolean enableSuppression,
57 final boolean writableStackTrace)
58 {
59 super(message, cause, enableSuppression, writableStackTrace);
60 }
61 }