asjava.uniclientlibs
Class UniException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byasjava.uniclientlibs.UniException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
UniCommandException, UniConnectionException, UniDataSetException, UniDynArrayException, UniFileException, UniNLSException, UniSelectListException, UniSequentialFileException, UniSessionException, UniStringException, UniSubroutineException, UniTransactionException, UniXMLException

public class UniException
extends java.lang.Exception

UniException is the primary class used for handling UniObjects Java class exceptions and errors. This internal error handling method is based on Java's method of handling errors. We have also carried over the idea of having an integer identifier for the message which can make the handling of said message a lot easier.

Since:
UNICLIENTLIBS 1.0
Version:
Version 1.0
Author:
David T. Meeks
See Also:
Serialized Form

Field Summary
protected  int errorType
           
static int UNICLIENTLIBS_EXCEPTION
           
static int UNICOMMAND_EXCEPTION
           
static int UNICONNECTION_EXCEPTION
           
static int UNIDATASET_EXCEPTION
           
static int UNIDYNARRAY_EXCEPTION
           
static int UNIFILE_EXCEPTION
           
static int UNINLS_EXCEPTION
           
static int UNISELECTLIST_EXCEPTION
           
static int UNISEQUENTIALFILE_EXCEPTION
           
static int UNISESSION_EXCEPTION
           
static int UNISTRING_EXCEPTION
           
static int UNISUBROUTINE_EXCEPTION
           
static int UNITRANSACTION_EXCEPTION
           
static int UNIXML_EXCEPTION
           
 
Constructor Summary
UniException()
          Creates the UniException object.
UniException(int aErrorCode)
          Creates the UniException object.
UniException(int aErrorCode, java.lang.String aExtraInfo)
          Creates the UniException object.
UniException(java.lang.String aError, int aErrorCode)
          Creates the UniException object.
UniException(java.lang.String aClassName, java.lang.String aError, int aErrorCode)
          Creates the UniException object.
 
Method Summary
 int getErrorCode()
          Returns the error number associated with this exception.
 int getErrorType()
          Returns the type of exception.
 java.lang.String getErrorTypeText()
          Returns the type of exception in String form
 java.lang.String getExtendedMessage()
          Returns the extended error text associated with this exception
 
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

UNICLIENTLIBS_EXCEPTION

public static final int UNICLIENTLIBS_EXCEPTION
See Also:
Constant Field Values

UNISTRING_EXCEPTION

public static final int UNISTRING_EXCEPTION
See Also:
Constant Field Values

UNIDYNARRAY_EXCEPTION

public static final int UNIDYNARRAY_EXCEPTION
See Also:
Constant Field Values

UNICOMMAND_EXCEPTION

public static final int UNICOMMAND_EXCEPTION
See Also:
Constant Field Values

UNIFILE_EXCEPTION

public static final int UNIFILE_EXCEPTION
See Also:
Constant Field Values

UNINLS_EXCEPTION

public static final int UNINLS_EXCEPTION
See Also:
Constant Field Values

UNISELECTLIST_EXCEPTION

public static final int UNISELECTLIST_EXCEPTION
See Also:
Constant Field Values

UNISEQUENTIALFILE_EXCEPTION

public static final int UNISEQUENTIALFILE_EXCEPTION
See Also:
Constant Field Values

UNISESSION_EXCEPTION

public static final int UNISESSION_EXCEPTION
See Also:
Constant Field Values

UNISUBROUTINE_EXCEPTION

public static final int UNISUBROUTINE_EXCEPTION
See Also:
Constant Field Values

UNITRANSACTION_EXCEPTION

public static final int UNITRANSACTION_EXCEPTION
See Also:
Constant Field Values

UNICONNECTION_EXCEPTION

public static final int UNICONNECTION_EXCEPTION
See Also:
Constant Field Values

UNIDATASET_EXCEPTION

public static final int UNIDATASET_EXCEPTION
See Also:
Constant Field Values

UNIXML_EXCEPTION

public static final int UNIXML_EXCEPTION
See Also:
Constant Field Values

errorType

protected int errorType
Constructor Detail

UniException

public UniException()
Creates the UniException object.

Since:
UNICLIENTLIBS 1.0

UniException

public UniException(int aErrorCode)
Creates the UniException object. This version only takes the error code of the failure, which it will use to lookup the error text from the UniErrorMessage object.

Parameters:
aErrorCode - integer representing the error number that occured
Since:
UNICLIENTLIBS 1.0

UniException

public UniException(java.lang.String aError,
                    int aErrorCode)
Creates the UniException object. Takes the error text from the exception and does not extract the message from UniErrorMessage

Parameters:
aError - string representing the message to be displayed
aErrorCode - integer representing the error number that occured
Since:
UNICLIENTLIBS 1.0

UniException

public UniException(int aErrorCode,
                    java.lang.String aExtraInfo)
Creates the UniException object. Takes the error text from the from UniErrorMessage, also uses the extra info passed in to properly set the error message

Parameters:
aExtraInfo - string representing the extra information to be displayed
aErrorCode - integer representing the error number that occured
Since:
UNICLIENTLIBS 1.0

UniException

public UniException(java.lang.String aClassName,
                    java.lang.String aError,
                    int aErrorCode)
Creates the UniException object.

Parameters:
aClassName - string representing the name of the class failure occured
aError - string representing the message to be displayed
aErrorCode - integer representing the error number that occured
Since:
UNICLIENTLIBS 1.0
Method Detail

getErrorCode

public int getErrorCode()
Returns the error number associated with this exception.

Returns:
integer representing the error number
Since:
UNICLIENTLIBS 1.0

getExtendedMessage

public java.lang.String getExtendedMessage()
Returns the extended error text associated with this exception

Returns:
integer representing the error number
Since:
UNICLIENTLIBS 1.0

getErrorType

public int getErrorType()
Returns the type of exception.

Returns:
int representing this exception
Since:
UNICLIENTLIBS 1.0

getErrorTypeText

public java.lang.String getErrorTypeText()
Returns the type of exception in String form

Returns:
String representing this exception
Since:
UNICLIENTLIBS 1.0