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-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://tudelft.nl/staff/p.knoppers-1">Peter Knoppers</a> 11 */ 12 public class ProbabilityException extends Exception 13 { 14 /** */ 15 private static final long serialVersionUID = 20160301L; 16 17 /** 18 * 19 */ 20 public ProbabilityException() 21 { 22 } 23 24 /** 25 * @param message String; String 26 */ 27 public ProbabilityException(final String message) 28 { 29 super(message); 30 } 31 32 /** 33 * @param cause Throwable; Throwable 34 */ 35 public ProbabilityException(final Throwable cause) 36 { 37 super(cause); 38 } 39 40 /** 41 * @param message String; String 42 * @param cause Throwable; Throwable 43 */ 44 public ProbabilityException(final String message, final Throwable cause) 45 { 46 super(message, cause); 47 } 48 49 /** 50 * @param message String; description of the problem 51 * @param cause Throwable; the cause of this ValueRuntimeException 52 * @param enableSuppression boolean; whether or not suppression is enabled or disabled 53 * @param writableStackTrace boolean; whether or not the stack trace should be writable 54 */ 55 public ProbabilityException(final String message, final Throwable cause, final boolean enableSuppression, 56 final boolean writableStackTrace) 57 { 58 super(message, cause, enableSuppression, writableStackTrace); 59 } 60 }