Class 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 Detail

      • AppBeanError

        public AppBeanError()
        Constructs a new AppBeanError instance with errorCode = 0 and empty message
      • AppBeanError

        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
      • AppBeanError

        public AppBeanError​(java.lang.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
      • AppBeanError

        public AppBeanError​(int errCode,
                            java.lang.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
      • AppBeanError

        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
      • AppBeanError

        public AppBeanError​(java.lang.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
      • 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 interface WebBeanError
        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 interface WebBeanError
        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 interface WebBeanError
        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()