Package org.kuali.rice.krad.exception
Class ExceptionIncident
java.lang.Object
org.kuali.rice.krad.exception.ExceptionIncident
- All Implemented Interfaces:
KualiExceptionIncident
Contains the exception incident information, exception, form and
session user. It is constructed and saved into the HTTP Request for passing to the
jsp when an exception occurs.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringBasic exception information is initialized and contained in this class instance.Fields inherited from interface org.kuali.rice.krad.exception.KualiExceptionIncident
COMPONENT_NAME, DESCRIPTION, DISPLAY_MESSAGE, DOCUMENT_ID, EXCEPTION_HIDE_INCIDENT_REPORT, EXCEPTION_MESSAGE, EXCEPTION_REPORT_MESSAGE, EXCEPTION_REPORT_SUBJECT, STACK_TRACE, USER_EMAIL, USER_NAME, UUID -
Constructor Summary
ConstructorsConstructorDescriptionExceptionIncident(Exception exception, Map<String, String> properties) This constructs list of key-value pairs from the caught exception and current settings.ExceptionIncident(Map<String, String> inputs) This constructs an instance of this class from list of name-value pairs. -
Method Summary
Modifier and TypeMethodDescriptiongetDisplayMessage(Exception exception) This overridden method return the exception if the ixception type is in the defined list.getExceptionStackTrace(Exception thrownException) This method return the thrown exception stack trace as string.getProperty(String key) This overridden method returns value of the found property key.This overridden method return current internal properties.
-
Field Details
-
GENERIC_SYSTEM_ERROR_MESSAGE
- See Also:
-
properties
Basic exception information is initialized and contained in this class instance. Additional setting and other information can be added when exception is caught. Also, an JSP is displayed to collect additional user information and the returned parameters from the JSP can be used to initialize this class instance for reporting.Note: The mechanism for passing data to and receiving data from the JSP uses java.util.Map. Therefore, the exception is not passed to JSP using HttpRequest. But rather a Map instance.
-
-
Constructor Details
-
ExceptionIncident
This constructs list of key-value pairs from the caught exception and current settings.- Parameters:
exception- Caught exceptionproperties- Input information when the exception is caughtExample:
- DOCUMENT_ID
- USER_EMAIL
- USER_NAME
- COMPONENT_NAME
-
ExceptionIncident
This constructs an instance of this class from list of name-value pairs.- Parameters:
inputs- List of exception information such as- DOCUMENT_ID - If it's document form
- USER_EMAIL - Session user email
- USER_NAME - Session user name
- COMPONENT_NAME - Document or lookup or inquiry form attribute of GlobalVariables
- EXCEPTION_REPORT_SUBJECT - Exception error message and current settings
- EXCEPTION_MESSAGE - Exception error message
- STACK_TRACE - Exception stack trace
- DESCRIPTION - Information input by user or blank
-
-
Method Details
-
getExceptionStackTrace
This method return the thrown exception stack trace as string. -
getDisplayMessage
This overridden method return the exception if the ixception type is in the defined list. Otherwise, it returns the GENERIC_SYSTEM_ERROR_MESSAGE.- Specified by:
getDisplayMessagein interfaceKualiExceptionIncident- Parameters:
exception- The caught exception- Returns:
- display message
- See Also:
-
getProperty
This overridden method returns value of the found property key. Except the property EXCEPTION_REPORT_MESSAGE- Specified by:
getPropertyin interfaceKualiExceptionIncident- Parameters:
key-- Returns:
- null is return if not found
- See Also:
-
toProperties
This overridden method return current internal properties.- Specified by:
toPropertiesin interfaceKualiExceptionIncident- Returns:
Example:
documentId, 2942084 userEmail, someone@somewhere userName, some name componentFormName, Form that threw exception name exceptionMessage, Error message from exception displayMessage, Either exception error message or generic exception error message stackTrace, Exception stack trace here- See Also:
-