Package com.microstrategy.web.app.beans
Class AppBeanError
- java.lang.Object
-
- com.microstrategy.web.app.beans.AppBeanError
-
- All Implemented Interfaces:
WebBeanError
public class AppBeanError extends java.lang.Object implements WebBeanError
The WebBeanError implementation used by application objects.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Constructor Summary
Constructors Constructor Description AppBeanError()Constructs a newAppBeanErrorinstance with errorCode = 0 and empty messageAppBeanError(int errCode)Constructs a newAppBeanErrorinstance with the given errorCode and empty messageAppBeanError(int errCode, ErrorInfo errorInfo, WebException ex, AppContext appContext, PageComponent page)Constructs a newAppBeanErrorinstance with the given error code.AppBeanError(int errorCode, java.lang.Exception e)AppBeanError(int errCode, java.lang.String errMsg)Constructs a newAppBeanErrorinstance with the given error Message and errorCodeAppBeanError(MSTRCheckedException ex, AppContext appContext, PageComponent page)Constructs a newAppBeanErrorinstance based on aMSTRCheckedExceptioninstanceAppBeanError(MSTRUncheckedException ex, AppContext appContext, PageComponent page)AppBeanError(WebException ex, AppContext appContext, PageComponent page)Constructs a newAppBeanErrorinstance with the given error exceptionAppBeanError(java.lang.Exception e)Constructs a newAppBeanErrorinstance based on the exception.AppBeanError(java.lang.String errMsg)Constructs a newAppBeanErrorinstance with the given error Message and errorCode = 0
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandisplayError()java.lang.ThrowablegetCause()Return the cause of the error, if there is any available.intgetErrorCode()Returns the error code to the caller.java.lang.StringgetErrorMessage()Return the error message to the caller.java.lang.StringgetErrorTitle()intgetErrorType()java.util.Map<java.lang.String,java.lang.Object>getExtProps()java.lang.StringgetStackTrace()booleanoriginalMessage()voidsetErrorType(int value)booleanshowContactInfo()Determine if contact information should be shown to the user or not.
-
-
-
Constructor Detail
-
AppBeanError
public AppBeanError()
Constructs a newAppBeanErrorinstance with errorCode = 0 and empty message
-
AppBeanError
public AppBeanError(int errCode)
Constructs a newAppBeanErrorinstance with the given errorCode and empty message- Parameters:
errCode- the error code of the error to create
-
AppBeanError
public AppBeanError(java.lang.String errMsg)
Constructs a newAppBeanErrorinstance with the given error Message and errorCode = 0- Parameters:
errMsg- the error message of the error to create
-
AppBeanError
public AppBeanError(int errCode, java.lang.String errMsg)Constructs a newAppBeanErrorinstance with the given error Message and errorCode- Parameters:
errCode- the error code of the error to createerrMsg- the error message of the error to create
-
AppBeanError
public AppBeanError(int errCode, ErrorInfo errorInfo, WebException ex, AppContext appContext, PageComponent page)Constructs a newAppBeanErrorinstance with the given error code. The error message will be initialized based on the errorInfo and exception, the error title based on the errorInfo, exception and page information.- Parameters:
errCode- the error code of the error to createerrorInfo- theErrorInfoinstance where the error information is foundex- originalWebExceptioninstance of the errorappContext-AppContextinstance initializedpage-PageComponentinstance initialized
-
AppBeanError
public AppBeanError(WebException ex, AppContext appContext, PageComponent page)
Constructs a newAppBeanErrorinstance with the given error exception- Parameters:
ex- originalWebExceptioninstance of the errorappContext-AppContextinstance initializedpage-PageComponentinstance initialized
-
AppBeanError
public AppBeanError(MSTRCheckedException ex, AppContext appContext, PageComponent page)
Constructs a newAppBeanErrorinstance based on aMSTRCheckedExceptioninstance- Parameters:
ex-MSTRCheckedExceptionto be used for initializing the new instance to be createdappContext-AppContextvalid instancepage-PageComponentcurrent instance- Since:
- MicroStrategy Web 8.0.1
-
AppBeanError
public AppBeanError(MSTRUncheckedException ex, AppContext appContext, PageComponent page)
- Since:
- MicroStrategy Web 9.0.0
-
AppBeanError
public AppBeanError(java.lang.Exception e)
Constructs a newAppBeanErrorinstance based on the exception. If the exception supports error code, it will use that error code, if not the error code is set to 0.
It sets the Message to whatever returned by the exception getMessage() method.- Parameters:
e- originalExceptioninstance of the error
-
AppBeanError
public AppBeanError(int errorCode, java.lang.Exception e)- Since:
- MicroStrategy Web 9.0.0
-
-
Method Detail
-
getErrorCode
public int getErrorCode()
Description copied from interface:WebBeanErrorReturns the error code to the caller. By default the error code is zero.- Specified by:
getErrorCodein interfaceWebBeanError- Returns:
- the error code associated with this error class.
-
getErrorType
public int getErrorType()
- Since:
- MicroStrategy Web 9.0.0
-
setErrorType
public void setErrorType(int value)
- Since:
- MicroStrategy Web 9.0.0
-
getErrorMessage
public java.lang.String getErrorMessage()
Description copied from interface:WebBeanErrorReturn the error message to the caller.- Specified by:
getErrorMessagein interfaceWebBeanError- Returns:
- the error message associated with this error class.
-
getErrorTitle
public java.lang.String getErrorTitle()
- Returns:
- the error title associated with this error class.
-
showContactInfo
public boolean showContactInfo()
Determine if contact information should be shown to the user or not.- Returns:
- a
booleanvalue indicating to show the contact information when the error is displayed
-
displayError
public boolean displayError()
- Returns:
- a
booleanvalue indicating to display or not the error information.
-
getStackTrace
public java.lang.String getStackTrace()
- Returns:
- the stack trace information of the error as a
String - Since:
- MicroStrategy Web 7.5.0
-
originalMessage
public boolean originalMessage()
- Returns:
- a
booleanvalue indicating if the original message should be shown to the user as part of the error information.
-
getCause
public java.lang.Throwable getCause()
Description copied from interface:WebBeanErrorReturn the cause of the error, if there is any available.- Specified by:
getCausein interfaceWebBeanError- Returns:
- a
Throwableinstance representing the original exception used to initialize this instance. - Since:
- MicroStrategy Web 7.5.0
-
getExtProps
public java.util.Map<java.lang.String,java.lang.Object> getExtProps()
-
-