public class

MSTRUncheckedException

extends RuntimeException
implements LocalizableException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ com.microstrategy.utils.MSTRUncheckedException
Known Direct Subclasses
Known Indirect Subclasses

Summary

Public Constructors
MSTRUncheckedException(LocalizableMessage errorMsg)
Constructor.
MSTRUncheckedException(LocalizableMessage errorMsg, Throwable e)
Constructor.
MSTRUncheckedException(int code, Object[] params, Locale locale)
This constructor is deprecated. use other constructor instead
MSTRUncheckedException(int code, Object[] params, Throwable e, Locale locale)
This constructor is deprecated. use other constructor instead
MSTRUncheckedException()
Constructor.
MSTRUncheckedException(String errorMsg)
Constructor.
MSTRUncheckedException(int errorCode)
This constructor is deprecated. use other constructor instead
MSTRUncheckedException(String errorMsg, int errorCode)
Constructor.
MSTRUncheckedException(String errorMsg, int errorCode, Throwable e)
Constructor.
MSTRUncheckedException(Throwable e)
Constructor.
Public Methods
Throwable getCause()
Retrieves the embedded throwable (or null if none).
Locale getDefaultLocale()
Returns default locale of this exception.
int getErrorCode()
Returns the error code associated with the given error.
LocalizableMessage getLocalizableMessage()
Returns LocalizableMessage object of this exception.
String getMessage(Locale locale)
String getMessage()
Returns the error message.
Throwable getRootCause()
void setCause(Throwable e)
Set the embedded error
void setDefaultLocale(Locale locale)
Sets the default locale of this exception.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object
From interface com.microstrategy.utils.LocalizableException

Public Constructors

public MSTRUncheckedException (LocalizableMessage errorMsg)

Constructor.

Parameters
errorMsg The error message for this exception.

public MSTRUncheckedException (LocalizableMessage errorMsg, Throwable e)

Constructor.

Parameters
errorMsg The error message for this exception.
e The embedded error object.

public MSTRUncheckedException (int code, Object[] params, Locale locale)

This constructor is deprecated.
use other constructor instead

Constructor.

Parameters
code error code.
params The parameters required to constructing the error message based on error code.
locale The locale to localize this exception.

public MSTRUncheckedException (int code, Object[] params, Throwable e, Locale locale)

This constructor is deprecated.
use other constructor instead

Constructor.

Parameters
code error code.
params The parameters required to constructing the error message based on error code.
e The embedded error.
locale The locale to localize this exception.

public MSTRUncheckedException ()

Constructor.

public MSTRUncheckedException (String errorMsg)

Constructor.

Parameters
errorMsg The error message for this exception.

public MSTRUncheckedException (int errorCode)

This constructor is deprecated.
use other constructor instead

Constructor.

Parameters
errorCode The error code for this exception.

public MSTRUncheckedException (String errorMsg, int errorCode)

Constructor.

Parameters
errorMsg The error message for this exception.
errorCode The error code for this exception.

public MSTRUncheckedException (String errorMsg, int errorCode, Throwable e)

Constructor.

Parameters
errorMsg The error message for this exception.
errorCode The error code for this exception.
e The embedded error.

public MSTRUncheckedException (Throwable e)

Constructor.

Parameters
e The embedded error.

Public Methods

public Throwable getCause ()

Retrieves the embedded throwable (or null if none).

Returns
  • The embedded throwable.

public Locale getDefaultLocale ()

Returns default locale of this exception.

Returns
  • default locale of this exception.

public int getErrorCode ()

Returns the error code associated with the given error. If this is 0 (i.e. the error had no code associated with it), and the message is also null, it will first examine if there is an embedded exception getCause(), if so and it is either a MSTRCheckedException or MSTRUncheckedException, it will attempt to return their error code instead (recursively searching). If the error code is non-zero or the message is not null, the error code of this exception is returned.

Returns
  • The error code for the given error.

public LocalizableMessage getLocalizableMessage ()

Returns LocalizableMessage object of this exception. If this exception does not have a message but the embedded error has one, the one from embedded will return.

Returns

public String getMessage (Locale locale)

public String getMessage ()

Returns the error message. If this is null and the error code is 0, it will first examine if there is an embedded exception getCause(), if so and it is either a MSTRCheckedException or MSTRUncheckedException, it will attempt to return their error message instead (recursively searching). If the message is not null or the error code is non-zero, the message of this exception is returned.

Returns
  • The error message.

public Throwable getRootCause ()

public void setCause (Throwable e)

Set the embedded error

Parameters
e The embedded error

public void setDefaultLocale (Locale locale)

Sets the default locale of this exception.

Parameters
locale new default locale