Package org.imixs.workflow.office.util
Class ErrorHelperBean
java.lang.Object
org.imixs.workflow.office.util.ErrorHelperBean
CDI Bean for handling and extracting meaningful error information from
servlet exceptions.
This bean provides utilities for JSF error pages to display user-friendly error messages and detailed debugging information. It automatically traverses exception chains to find the most relevant error messages, prioritizing business exceptions over technical wrapper exceptions.
Usage in JSF pages:
<h:outputText value="#{errorHelperBean.rootCauseMessage}" />
<h:outputText value="#{errorHelperBean.fullStackTrace}" />
Example Exception Chain Handling:
ObserverException
└─ Caused by: SomeWrapperException
└─ Caused by: ModelException: "Invalid expression: #{!controller.method()}"
Result: Returns "Invalid expression: #{!controller.method()}" as the root cause message
- Since:
- 1.0
- Author:
- rsoika
- See Also:
-
HttpServletRequestFacesContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a detailed exception chain with all causesReturns the full stack trace as formatted stringRetrieves the root cause message from the exception stackReturns the exception type of the root causeGets additional servlet error attributes for debugging
-
Constructor Details
-
ErrorHelperBean
public ErrorHelperBean()
-
-
Method Details
-
getRootCauseMessage
Retrieves the root cause message from the exception stack -
getRootCauseType
Returns the exception type of the root cause -
getFullStackTrace
Returns the full stack trace as formatted string -
getExceptionChain
Returns a detailed exception chain with all causes -
getServletErrorInfo
Gets additional servlet error attributes for debugging
-