|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.rice.kns.exception.ExceptionIncident
public class ExceptionIncident
This class 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.
Field Summary | |
---|---|
static String |
GENERIC_SYSTEM_ERROR_MESSAGE
|
private static org.apache.log4j.Logger |
LOG
|
protected Map<String,String> |
properties
Basic exception information is initialized and contained in this class instance. |
Fields inherited from interface org.kuali.rice.kns.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 | |
---|---|
ExceptionIncident(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 | |
---|---|
private String |
createReportMessage()
This method compose the exception information that includes documentId - If it's document form userEmail - Session user email userName - Session user name component - Document or lookup or inquiry form description - Information input by user or blank errorMessage - Exception error message stackTrace - Exception stack trace |
private String |
createReportSubject(Exception exception)
This method compose the exception information that includes environment - Application environment componentName- Document or lookup or inquiry form errorMessage - Exception error message |
String |
getDisplayMessage(Exception exception)
This overridden method return the exception if the ixception type is in the defined list. |
private Map<String,String> |
getExceptionInfo(Exception exception)
This method return list of required information provided by the caught exception. |
String |
getExceptionStackTrace(Exception thrownException)
This method return the thrown exception stack trace as string. |
String |
getProperty(String key)
This overridden method returns value of the found property key. |
private void |
initialize(Exception thrownException,
Map<String,String> inputs)
This method create and populate the internal properties parameter. |
Map<String,String> |
toProperties()
This overridden method return current internal properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.log4j.Logger LOG
public static final String GENERIC_SYSTEM_ERROR_MESSAGE
protected Map<String,String> properties
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 Detail |
---|
public ExceptionIncident(Exception exception, Map<String,String> properties)
exception
- Caught exceptionexceptionNames
- List of Kuali exception for determining the display exception
messageproperties
- Input information when the exception is caught
Example:
public ExceptionIncident(Map<String,String> inputs)
inputs
- List of exception information such as
Method Detail |
---|
private void initialize(Exception thrownException, Map<String,String> inputs)
thrownException
- The caught exceptioninputs
- Input information when the exception is caught
Example:
private Map<String,String> getExceptionInfo(Exception exception)
Example:
exceptionSubject, Caught exception message and settings information
exceptionMessage, Caught exception message
displayMessage, Either exception error message or generic exception error message
stackTrace, Exception stack trace here
private String createReportSubject(Exception exception)
Example;
kr-dev:SomeForm:Some error message
exception
- The caught exception
private String createReportMessage()
Example;
documentId: 2942084
userEmail: someone@somewhere
userName: some name
description: Something went wrong!
component: document
errorMessage: Some error message
stackTrace: Exception stack trace here
public String getExceptionStackTrace(Exception thrownException)
thrownException
-
public String getDisplayMessage(Exception exception)
getDisplayMessage
in interface KualiExceptionIncident
KualiExceptionIncident.getDisplayMessage(Exception)
public String getProperty(String key)
getProperty
in interface KualiExceptionIncident
KualiExceptionIncident.getProperty(java.lang.String)
public Map<String,String> toProperties()
toProperties
in interface KualiExceptionIncident
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
KualiExceptionIncident.toProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |