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 newAppBeanError
instance with errorCode = 0 and empty messageAppBeanError(int errCode)
Constructs a newAppBeanError
instance with the given errorCode and empty messageAppBeanError(int errCode, ErrorInfo errorInfo, WebException ex, AppContext appContext, PageComponent page)
Constructs a newAppBeanError
instance with the given error code.AppBeanError(int errorCode, java.lang.Exception e)
AppBeanError(int errCode, java.lang.String errMsg)
Constructs a newAppBeanError
instance with the given error Message and errorCodeAppBeanError(MSTRCheckedException ex, AppContext appContext, PageComponent page)
Constructs a newAppBeanError
instance based on aMSTRCheckedException
instanceAppBeanError(MSTRUncheckedException ex, AppContext appContext, PageComponent page)
AppBeanError(WebException ex, AppContext appContext, PageComponent page)
Constructs a newAppBeanError
instance with the given error exceptionAppBeanError(java.lang.Exception e)
Constructs a newAppBeanError
instance based on the exception.AppBeanError(java.lang.String errMsg)
Constructs a newAppBeanError
instance with the given error Message and errorCode = 0
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
displayError()
java.lang.Throwable
getCause()
Return the cause of the error, if there is any available.int
getErrorCode()
Returns the error code to the caller.java.lang.String
getErrorMessage()
Return the error message to the caller.java.lang.String
getErrorTitle()
int
getErrorType()
java.util.Map<java.lang.String,java.lang.Object>
getExtProps()
java.lang.String
getStackTrace()
boolean
originalMessage()
void
setErrorType(int value)
boolean
showContactInfo()
Determine if contact information should be shown to the user or not.
-
-
-
Constructor Detail
-
AppBeanError
public AppBeanError()
Constructs a newAppBeanError
instance with errorCode = 0 and empty message
-
AppBeanError
public AppBeanError(int errCode)
Constructs a newAppBeanError
instance 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 newAppBeanError
instance 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 newAppBeanError
instance 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 newAppBeanError
instance 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
- theErrorInfo
instance where the error information is foundex
- originalWebException
instance of the errorappContext
-AppContext
instance initializedpage
-PageComponent
instance initialized
-
AppBeanError
public AppBeanError(WebException ex, AppContext appContext, PageComponent page)
Constructs a newAppBeanError
instance with the given error exception- Parameters:
ex
- originalWebException
instance of the errorappContext
-AppContext
instance initializedpage
-PageComponent
instance initialized
-
AppBeanError
public AppBeanError(MSTRCheckedException ex, AppContext appContext, PageComponent page)
Constructs a newAppBeanError
instance based on aMSTRCheckedException
instance- Parameters:
ex
-MSTRCheckedException
to be used for initializing the new instance to be createdappContext
-AppContext
valid instancepage
-PageComponent
current 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 newAppBeanError
instance 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
- originalException
instance 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:WebBeanError
Returns the error code to the caller. By default the error code is zero.- Specified by:
getErrorCode
in 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:WebBeanError
Return the error message to the caller.- Specified by:
getErrorMessage
in 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
boolean
value indicating to show the contact information when the error is displayed
-
displayError
public boolean displayError()
- Returns:
- a
boolean
value 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
boolean
value 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:WebBeanError
Return the cause of the error, if there is any available.- Specified by:
getCause
in interfaceWebBeanError
- Returns:
- a
Throwable
instance 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()
-
-