Package net.sf.basedb.core
Class NumberOutOfRangeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
net.sf.basedb.core.BaseException
net.sf.basedb.core.InvalidDataException
net.sf.basedb.core.NumberOutOfRangeException
- All Implemented Interfaces:
Serializable
This exception is thrown when an item's field or a parameter
that only accepts numeric values within a certain range are
passed a value outside that range.
- Version:
- 2.0
- Author:
- Nicklas
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreate a newNumberOutOfRangeException
object.NumberOutOfRangeException
(String field, double theValue, double minOrMaxValue, boolean tooBig) Create a newNumberOutOfRangeException
object when the parameter is less than a minimum or greater than a maximum value.NumberOutOfRangeException
(String field, double theValue, double minValue, double maxValue) Create a newNumberOutOfRangeException
object when the parameter is outside both a minimum and a maximum allowed value.NumberOutOfRangeException
(String field, long theValue, long minOrMaxValue, boolean tooBig) Create a newNumberOutOfRangeException
object when the parameter is less than a minimum or greater than a maximum value.NumberOutOfRangeException
(String field, long theValue, long minValue, long maxValue) Create a newNumberOutOfRangeException
object when the parameter is outside both a minimum and a maximum allowed value. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
NumberOutOfRangeException
public NumberOutOfRangeException()Create a newNumberOutOfRangeException
object. -
NumberOutOfRangeException
-
NumberOutOfRangeException
Create a newNumberOutOfRangeException
object when the parameter is less than a minimum or greater than a maximum value.- Parameters:
field
- The name of the field or parameter that is invalidtheValue
- The value that is invalidminOrMaxValue
- The minimum or maximum allowed valuetooBig
- TRUE if the value is greater than the maximum allowed, FALSE if it is less than the minumum allowed
-
NumberOutOfRangeException
Create a newNumberOutOfRangeException
object when the parameter is outside both a minimum and a maximum allowed value.- Parameters:
field
- The name of the field or parameter that is outside the rangetheValue
- The value that is outside the rangeminValue
- The minimum allowed value of the numbermaxValue
- The maximum allowed value of the number
-
NumberOutOfRangeException
public NumberOutOfRangeException(String field, double theValue, double minOrMaxValue, boolean tooBig) Create a newNumberOutOfRangeException
object when the parameter is less than a minimum or greater than a maximum value.- Parameters:
field
- The name of the field or parameter that is invalidtheValue
- The value that is invalidminOrMaxValue
- The minimum or maximum allowed valuetooBig
- TRUE if the value is greater than the maximum allowed, FALSE if it is less than the minumum allowed
-
NumberOutOfRangeException
Create a newNumberOutOfRangeException
object when the parameter is outside both a minimum and a maximum allowed value.- Parameters:
field
- The name of the field or parameter that is outside the rangetheValue
- The value that is outside the rangeminValue
- The minimum allowed value of the numbermaxValue
- The maximum allowed value of the number
-