|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--java.lang.RuntimeException
|
+--uk.co.prosperosoftware.pspnum.PSPException
Error thrown by other PSP* objects. Each PSPException object
contains an error number value which can be determined
using the getErrNum() method and then compared to one
of the static error number variables defined for the class.
Each PSPException object also supports a getErrFunction()
method which gives you the name of the PSP method which
generated the error. This is often - but not always - the
top-level method you called in your code. Sometimes it is
a lower level function.
| Field Summary | |
static int |
BadDefaultNumFmt
Error number 11 - thrown when you try to set the default format for a PSP numeric class (subsequently applied to each new object created for that class) to a value other than 'P' (for packed decimal format) or 'Z' (for zoned decimal format). |
static int |
BadDimension
Error number 12 - thrown when you try to set the dimension of a decimal array object to a value which 1) exceeds an upper limit for the array dimension (this limit is determined by each PSP class which throws this message) or 2) is less than one (each decimal numeric array object must have at least one element). |
static int |
BadNumDigits
Error number 22 - thrown when you try to set either DigitsBeforeDP or DigitsAfterDP such that the total of their two values 1) exceeds an upper limit for the total number of digits allowed in a numeric value (this limit is determined by each PSP class which throws this message) or 2) is less than one (every decimal numeric object must have a value length of at least one digit). |
static int |
BadNumDigitsAfterDP
Error number 21 - thrown when you try to set DigitsAfterDP to a value which 1) exceeds an upper limit for the number of digits allowed after the decimal place in a numeric value (this limit is determined by each PSP class which throws this message) or 2) is less than zero (no decimal numeric object can have a negative number of digits after the decimal place). |
static int |
BadNumDigitsBeforeDP
Error number 20 - thrown when you try to set DigitsBeforeDP to a value which 1) exceeds an upper limit for the number of digits allowed before the decimal place in a numeric value (this limit is determined by each PSP class which throws this message) or 2) is less than zero (no decimal numeric object can have a negative number of digits before the decimal place). |
static int |
BadNumFmt
Error number 19 - thrown when you try to set the format for a PSP numeric object (one instance) to a value other than 'P' (for packed decimal format) or 'Z' (for zoned decimal format). |
static int |
BadPackNumHigh
Error number 23 - thrown when one of the bytes in a byte array which holds a packed decimal value has an invalid value for a high-order nibble (half-byte) = left-hand four bits. |
static int |
BadPackNumLow
Error number 24 - thrown when one of the bytes in a byte array which holds a packed decimal value has an invalid value for a low-order nibble (half-byte) = right-hand four bits. |
static int |
BadStringNumber
Error number 27 - thrown when a String does not contain a valid numeric value. |
static int |
BadZoneNumHigh
Error number 30 - thrown when one of the bytes in a byte array which holds a zoned decimal value has an invalid value for a high-order nibble (half-byte) = left-hand four bits. |
static int |
BadZoneNumLow
Error number 31 - thrown when one of the bytes in a byte array which holds a zoned decimal value has an invalid value for a low-order nibble (half-byte) = right-hand four bits. |
static int |
ByteArrayTooShort
Error number 84 - thrown whan you pass a byte array as a parameter to a PSP function which is too short (length less than expected number of bytes) when checked by that function. |
static int |
DivideByZero
Error number 36 - thrown when you try to divide any decimal numeric value by another value (the divisor) which has a zero value at run-time. |
static int |
HighBase
Error number 79 - thrown when you try to set the base of a decimal array object to a value which exceeds an upper limit for the array base (this limit is determined by each PSP class which throws this message). |
static int |
HighIndex
Error number 62 - thrown when you try to set the current element of a decimal numeric array to a value (the index) which is beyond the end of the array. |
static int |
LowBase
Error number 80 - thrown when you try to set the base of a decimal array object to a value less than zero. |
static int |
LowIndex
Error number 64 - thrown when you try to set the current element of a decimal numeric array to a value (the index) which is before the start of the array. |
static int |
NegativeRoot
Error number 68 - thrown when you try to take the square root of a decimal number which has a negative value at run-time. |
static int |
NotAscendSeq
Error number 69 - thrown when an operation is done on a decimal numeric array that must be sorted into ascending sequence before the operation can be performed. |
static int |
NotDescendSeq
Error number 70 - thrown when an operation is done on a decimal numeric array that must be sorted into descending sequence before the operation can be performed. |
static int |
NullInternalObject
Error number 82 - thrown when an object (String, StringBuffer or byte array) passed internally from one PSP function to another tests equal to the 'null' value when checked by the called function. |
static int |
NullObject
Error number 73 - thrown when an object (String, StringBuffer or byte array) which you pass as a parameter to a PSP function tests equal to the 'null' value when checked by that function. |
static int |
NumOverflow
Error number 81 - thrown when a decimal numeric value would overflow (more digits before decimal place than allowed for that value) if an arithmetic or assignment operation were to proceed. |
static int |
ObjRecImbalance
Error number 74 - thrown when an operation internal to PSP (tracing calls in a stack) blows up. |
static int |
ObjRecOverFlow
Error number 75 - thrown when an operation internal to PSP (tracing calls in a stack) blows up. |
static int |
ObjRecUnderFlow
Error number 76 - thrown when an operation internal to PSP (tracing calls in a stack) blows up. |
static int |
OutOfMemory
Error number 77 - thrown when an object (typically a String, StringBuffer or byte array) which is created automatically within a PSP function using the Java 'new' operator tests equal to the 'null' value when checked by that function after creation. |
| Constructor Summary | |
PSPException()
Constructs a PSPException with no detail message. |
|
PSPException(int n,
java.lang.String s)
Constructs a PSPException with the specified detail message and error number. |
|
PSPException(int n,
java.lang.String s,
java.lang.String f)
Constructs a PSPException with the specified detail message, error number and error function. |
|
PSPException(PSPException e)
Constructs a copy of the PSPException parameter. |
|
| Method Summary | |
java.lang.String |
getErrFunction()
returns name of PSP function associated with this error. |
int |
getErrNum()
returns PSP error number. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int BadDefaultNumFmt
public static final int BadDimension
public static final int BadNumFmt
public static final int BadNumDigitsBeforeDP
public static final int BadNumDigitsAfterDP
public static final int BadNumDigits
public static final int BadPackNumHigh
public static final int BadPackNumLow
public static final int BadStringNumber
public static final int BadZoneNumHigh
public static final int BadZoneNumLow
public static final int DivideByZero
public static final int HighIndex
public static final int LowIndex
public static final int NegativeRoot
public static final int NotAscendSeq
public static final int NotDescendSeq
public static final int NullObject
public static final int ObjRecImbalance
public static final int ObjRecOverFlow
public static final int ObjRecUnderFlow
public static final int OutOfMemory
public static final int HighBase
public static final int LowBase
public static final int NumOverflow
public static final int NullInternalObject
public static final int ByteArrayTooShort
| Constructor Detail |
public PSPException()
public PSPException(int n,
java.lang.String s)
n - The error number.s - The error message.
public PSPException(int n,
java.lang.String s,
java.lang.String f)
n - The error number.s - The error message.public PSPException(PSPException e)
e - The PSPException to be copied.| Method Detail |
public int getErrNum()
public java.lang.String getErrFunction()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||