Package org.cdlib.mrt.utility
Class TException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.cdlib.mrt.utility.TException
- All Implemented Interfaces:
Serializable,StateInf
- Direct Known Subclasses:
TException.CONCURRENT_UPDATE,TException.EXTERNAL_SERVICE_UNAVAILABLE,TException.FIXITY_CHECK_FAILS,TException.GATEWAY_TIMEOUT,TException.GENERAL_EXCEPTION,TException.INVALID_ARCHITECTURE,TException.INVALID_CONFIGURATION,TException.INVALID_DATA_FORMAT,TException.INVALID_OR_MISSING_PARM,TException.LOCKING_ERROR,TException.NEARLINE_RESTORE_IN_PROCESS,TException.REMOTE_IO_SERVICE_EXCEPTION,TException.REQUEST_ELEMENT_UNSUPPORTED,TException.REQUEST_INVALID,TException.REQUEST_ITEM_EXISTS,TException.REQUESTED_ITEM_NOT_FOUND,TException.SQL_EXCEPTION,TException.UNIMPLEMENTED_CODE,TException.USER_NOT_AUTHENTICATED,TException.USER_NOT_AUTHORIZED
mrt Exception
- Author:
- dloy
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCONCURRENT_UPDATE subclass See TExceptionEnum value for descriptionstatic classEXTERNAL_SERVICE_UNAVAILABLE subclass See TExceptionEnum value for descriptionstatic classFIXITY_CHECK_FAILS subclass See TExceptionEnum value for descriptionstatic classSQL_EXCEPTION subclass See TExceptionEnum value for descriptionstatic classGENERAL_EXCEPTION subclass See TExceptionEnum value for descriptionstatic classINVALID_ARCHITECTURE subclass See TExceptionEnum value for descriptionstatic classINVALID_CONFIGURATION subclass See TExceptionEnum value for descriptionstatic classINVALID_DATA_FORMAT subclass See TExceptionEnum value for descriptionstatic classINVALID_OR_MISSING_PARM subclass See TExceptionEnum value for descriptionstatic classLOCKING_ERROR subclass See TExceptionEnum value for descriptionstatic classSQL_EXCEPTION subclass See TExceptionEnum value for descriptionstatic classAttempt to read or write to remote external IO service failsstatic classREQUEST_ELEMENT_UNSUPPORTED subclass See TExceptionEnum value for descriptionstatic classREQUEST_INVALID subclass See TExceptionEnum value for descriptionstatic classREQUEST_ITEM_EXISTS subclass See TExceptionEnum value for descriptionstatic classREQUESTED_ITEM_NOT_FOUND subclass See TExceptionEnum value for descriptionstatic classSQL_EXCEPTION subclass See TExceptionEnum value for descriptionstatic classUNIMPLEMENTED_CODE subclass See TExceptionEnum value for descriptionstatic classUSER_NOT_AUTHENTICATED subclass See TExceptionEnum value for descriptionstatic classUSER_NOT_AUTHORIZED subclass See TExceptionEnum value for description -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTException(Exception ex) Degenerate case - where only an exceptin is provided.TException(TExceptionEnum status, Exception ex) The constructor set the status code and no messageTException(TExceptionEnum status, String msg) This constuctor sets the message and status code associated with this exception.TException(TExceptionEnum status, String msg, Exception ex) The constructor set the status code and no message -
Method Summary
Modifier and TypeMethodDescriptionReturn name of class where this exception occurredget a String message associated with the MExceptionEnum.-- non-static versionstatic StringgetDescription(TExceptionEnum mnemonic) get a String message associated with an integer mnemonic codeget the String detail message, more information on an errorgetError()return the descriptionintreturn the status descriptionintprogram code line number for this exceptionlocation of exceptionReturn name of method where exception occurredReturn any remote exception stored as part of creating TExceptionreturn the status codereturn the status descriptionvalue of statusgetTrace()return the stack tracevoidset the String detail message to give more information on an errorprotected voidsetTException(TExceptionEnum status, String msg, Exception ex) Set exception content based on whether a message or remote exception was provided.toString()toString returns this exception as a stringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
status
-
remoteException
-
detail
-
-
Constructor Details
-
TException
Degenerate case - where only an exceptin is provided. This defaults to a GENERAL_EXCEPTION status- Parameters:
ex- remote exception to be saved
-
TException
The constructor set the status code and no message- Parameters:
status- - the int status code associated with this exceptionex- remote exception to be saved
-
TException
This constuctor sets the message and status code associated with this exception.- Parameters:
status- - the int status codemsg- - the String message
-
TException
The constructor set the status code and no message- Parameters:
status- - the int status code associated with this exceptionmsg- - the String messageex- remote exception to be saved
-
-
Method Details
-
setTException
Set exception content based on whether a message or remote exception was provided. If a remote exception is also a TException then the value of the original TException is saved.- Parameters:
status- the int status code associated with this exceptionmsg- the String messageex- remote exception to be saved
-
getStatus
return the status code -
getRemoteException
Return any remote exception stored as part of creating TException- Returns:
- remote exception
-
getClassName
Return name of class where this exception occurred- Returns:
- exception originating exception
-
getMethodName
Return name of method where exception occurred- Returns:
- originating name of method for this exception
-
getLineNumber
public int getLineNumber()program code line number for this exception- Returns:
- program line number
-
getStatusName
value of status -
getStatusDescription
return the status description -
getHTTPResponse
public int getHTTPResponse()return the status description -
getError
return the description -
getTrace
return the stack trace -
getLocation
location of exception- Returns:
- exception location
-
toString
toString returns this exception as a string -
getDescription
get a String message associated with an integer mnemonic code- Parameters:
int- mnemonic integer associated with exception- Returns:
- String message from messages Hashtable
-
getDescription
get a String message associated with the MExceptionEnum.-- non-static version- Returns:
- String message from messages Hashtable
-
setDetail
set the String detail message to give more information on an error- Parameters:
String- detail message
-
getDetail
get the String detail message, more information on an error- Returns:
- String detail message
-
dump
-
getAccessExcp
-