public class

AppBeanError

extends Object
implements WebBeanError
java.lang.Object
   ↳ com.microstrategy.web.app.beans.AppBeanError

Class Overview

The WebBeanError implementation used by application objects.

Summary

Public Constructors
AppBeanError()
Constructs a new AppBeanError instance with errorCode = 0 and empty message
AppBeanError(int errCode)
Constructs a new AppBeanError instance with the given errorCode and empty message
AppBeanError(String errMsg)
Constructs a new AppBeanError instance with the given error Message and errorCode = 0
AppBeanError(int errCode, String errMsg)
Constructs a new AppBeanError instance with the given error Message and errorCode
AppBeanError(int errCode, ErrorInfo errorInfo, WebException ex, AppContext appContext, PageComponent page)
Constructs a new AppBeanError instance with the given error code.
AppBeanError(WebException ex, AppContext appContext, PageComponent page)
Constructs a new AppBeanError instance with the given error exception
AppBeanError(MSTRCheckedException ex, AppContext appContext, PageComponent page)
Constructs a new AppBeanError instance based on a MSTRCheckedException instance
AppBeanError(MSTRUncheckedException ex, AppContext appContext, PageComponent page)
AppBeanError(Exception e)
Constructs a new AppBeanError instance based on the exception.
AppBeanError(int errorCode, Exception e)
Public Methods
boolean displayError()
Throwable getCause()
Return the cause of the error, if there is any available.
int getErrorCode()
Returns the error code to the caller.
String getErrorMessage()
Return the error message to the caller.
String getErrorTitle()
int getErrorType()
Map<String, Object> getExtProps()
String getStackTrace()
boolean originalMessage()
void setErrorType(int value)
boolean showContactInfo()
Determine if contact information should be shown to the user or not.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.microstrategy.web.beans.WebBeanError

Public Constructors

public AppBeanError ()

Constructs a new AppBeanError instance with errorCode = 0 and empty message

public AppBeanError (int errCode)

Constructs a new AppBeanError instance with the given errorCode and empty message

Parameters
errCode the error code of the error to create

public AppBeanError (String errMsg)

Constructs a new AppBeanError instance with the given error Message and errorCode = 0

Parameters
errMsg the error message of the error to create

public AppBeanError (int errCode, String errMsg)

Constructs a new AppBeanError instance with the given error Message and errorCode

Parameters
errCode the error code of the error to create
errMsg the error message of the error to create

public AppBeanError (int errCode, ErrorInfo errorInfo, WebException ex, AppContext appContext, PageComponent page)

Constructs a new AppBeanError 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 create
errorInfo the ErrorInfo instance where the error information is found
ex original WebException instance of the error
appContext AppContext instance initialized
page PageComponent instance initialized

public AppBeanError (WebException ex, AppContext appContext, PageComponent page)

Constructs a new AppBeanError instance with the given error exception

Parameters
ex original WebException instance of the error
appContext AppContext instance initialized
page PageComponent instance initialized

public AppBeanError (MSTRCheckedException ex, AppContext appContext, PageComponent page)

Constructs a new AppBeanError instance based on a MSTRCheckedException instance

Parameters
ex MSTRCheckedException to be used for initializing the new instance to be created
appContext AppContext valid instance
page PageComponent current instance

public AppBeanError (MSTRUncheckedException ex, AppContext appContext, PageComponent page)

public AppBeanError (Exception e)

Constructs a new AppBeanError 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 original Exception instance of the error

public AppBeanError (int errorCode, Exception e)

Public Methods

public boolean displayError ()

Returns
  • a boolean value indicating to display or not the error information.

public Throwable getCause ()

Return the cause of the error, if there is any available.

Returns
  • a Throwable instance representing the original exception used to initialize this instance.

public int getErrorCode ()

Returns the error code to the caller. By default the error code is zero.

Returns
  • the error code associated with this error class.

public String getErrorMessage ()

Return the error message to the caller.

Returns
  • the error message associated with this error class.

public String getErrorTitle ()

Returns
  • the error title associated with this error class.

public int getErrorType ()

public Map<String, Object> getExtProps ()

public String getStackTrace ()

Returns
  • the stack trace information of the error as a String

public boolean originalMessage ()

Returns
  • a boolean value indicating if the original message should be shown to the user as part of the error information.

public void setErrorType (int value)

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