public class Exceptions extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
finite(String name,
double value)
Throws an illegal argument exception if the specified value is
not finite.
|
static void |
finiteNonNegative(String name,
double value)
Throws an illegal argument exception if the specified value is
not finite and non-negative, using the specified variable name
in the report.
|
static IllegalArgumentException |
toIllegalArgument(String msg,
Throwable t)
Convert the specified throwable to an illegal argument
exception.
|
static IOException |
toIO(String msg,
Throwable t)
Convert the specified throwable to an I/O exception.
|
public static IOException toIO(String msg, Throwable t)
msg - Message to include in result's message.t - Throwable to use for message and stack trace.public static IllegalArgumentException toIllegalArgument(String msg, Throwable t)
msg - Message to include in result's message.t - Throwable to use for message and stack trace.public static void finiteNonNegative(String name, double value)
Double.NaN is not considered
finite.name - Name of variable to report.value - Value to test.IllegalArgumentException - If the value is not finite and
non-negative.public static void finite(String name, double value)
Double.NaN is not considered
finite.name - Name of variable to report.value - Value to test.IllegalArgumentException - If the value is not finite.Copyright © 2019 Alias-i, Inc.. All rights reserved.