Package com.microstrategy.utils
Class MSTRUncheckedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.microstrategy.utils.MSTRUncheckedException
-
- All Implemented Interfaces:
LocalizableException
,java.io.Serializable
- Direct Known Subclasses:
BeanNotFoundException
,ContainerException
,UnmodifiableException
,WebAppRuntimeException
,WebObjectsRuntimeException
,XMLBuilderException
,XMLSupportRuntimeException
public class MSTRUncheckedException extends java.lang.RuntimeException implements LocalizableException
- Since:
- MicroStrategy Web 7.3.1 or earlier
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MSTRUncheckedException()
Constructor.MSTRUncheckedException(int errorCode)
Deprecated.use other constructor insteadMSTRUncheckedException(int code, java.lang.Object[] params, java.lang.Throwable e, java.util.Locale locale)
Deprecated.use other constructor insteadMSTRUncheckedException(int code, java.lang.Object[] params, java.util.Locale locale)
Deprecated.use other constructor insteadMSTRUncheckedException(LocalizableMessage errorMsg)
Constructor.MSTRUncheckedException(LocalizableMessage errorMsg, java.lang.Throwable e)
Constructor.MSTRUncheckedException(java.lang.String errorMsg)
Constructor.MSTRUncheckedException(java.lang.String errorMsg, int errorCode)
Constructor.MSTRUncheckedException(java.lang.String errorMsg, int errorCode, java.lang.Throwable e)
Constructor.MSTRUncheckedException(java.lang.Throwable e)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Throwable
getCause()
Retrieves the embedded throwable (or null if none).java.util.Locale
getDefaultLocale()
Returns default locale of this exception.int
getErrorCode()
Returns the error code associated with the given error.LocalizableMessage
getLocalizableMessage()
ReturnsLocalizableMessage
object of this exception.java.lang.String
getMessage()
Returns the error message.java.lang.String
getMessage(java.util.Locale locale)
java.lang.Throwable
getRootCause()
void
setCause(java.lang.Throwable e)
Set the embedded errorvoid
setDefaultLocale(java.util.Locale locale)
Sets the default locale of this exception.
-
-
-
Constructor Detail
-
MSTRUncheckedException
public MSTRUncheckedException(LocalizableMessage errorMsg)
Constructor.- Parameters:
errorMsg
- The error message for this exception.- Since:
- MicroStrategy Web 8.0.0
-
MSTRUncheckedException
public MSTRUncheckedException(LocalizableMessage errorMsg, java.lang.Throwable e)
Constructor.- Parameters:
errorMsg
- The error message for this exception.e
- The embedded error object.- Since:
- MicroStrategy Web 8.0.0
-
MSTRUncheckedException
public MSTRUncheckedException(int code, java.lang.Object[] params, java.util.Locale locale)
Deprecated.use other constructor insteadConstructor.- Parameters:
code
- error code.locale
- The locale to localize this exception.params
- The parameters required to constructing the error message based on error code.- Since:
- MicroStrategy Web 8.0.0
-
MSTRUncheckedException
public MSTRUncheckedException(int code, java.lang.Object[] params, java.lang.Throwable e, java.util.Locale locale)
Deprecated.use other constructor insteadConstructor.- Parameters:
code
- error code.locale
- The locale to localize this exception.params
- The parameters required to constructing the error message based on error code.e
- The embedded error.- Since:
- MicroStrategy Web 8.0.0
-
MSTRUncheckedException
public MSTRUncheckedException()
Constructor.
-
MSTRUncheckedException
public MSTRUncheckedException(java.lang.String errorMsg)
Constructor.- Parameters:
errorMsg
- The error message for this exception.
-
MSTRUncheckedException
public MSTRUncheckedException(int errorCode)
Deprecated.use other constructor insteadConstructor.- Parameters:
errorCode
- The error code for this exception.
-
MSTRUncheckedException
public MSTRUncheckedException(java.lang.String errorMsg, int errorCode)
Constructor.- Parameters:
errorCode
- The error code for this exception.errorMsg
- The error message for this exception.
-
MSTRUncheckedException
public MSTRUncheckedException(java.lang.String errorMsg, int errorCode, java.lang.Throwable e)
Constructor.- Parameters:
errorCode
- The error code for this exception.errorMsg
- The error message for this exception.e
- The embedded error.
-
MSTRUncheckedException
public MSTRUncheckedException(java.lang.Throwable e)
Constructor.- Parameters:
e
- The embedded error.
-
-
Method Detail
-
getErrorCode
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 exceptiongetCause()
, 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.- Specified by:
getErrorCode
in interfaceLocalizableException
- Returns:
- The error code for the given error.
-
getMessage
public java.lang.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 exceptiongetCause()
, 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.- Specified by:
getMessage
in interfaceLocalizableException
- Overrides:
getMessage
in classjava.lang.Throwable
- Returns:
- The error message.
-
getMessage
public java.lang.String getMessage(java.util.Locale locale)
- Specified by:
getMessage
in interfaceLocalizableException
- Since:
- MicroStrategy Web 8.0.0
-
getCause
public java.lang.Throwable getCause()
Retrieves the embedded throwable (or null if none).- Overrides:
getCause
in classjava.lang.Throwable
- Returns:
- The embedded throwable.
-
getRootCause
public java.lang.Throwable getRootCause()
-
setCause
public void setCause(java.lang.Throwable e)
Set the embedded error- Parameters:
e
- The embedded error
-
getLocalizableMessage
public LocalizableMessage getLocalizableMessage()
ReturnsLocalizableMessage
object of this exception. If this exception does not have a message but the embedded error has one, the one from embedded will return.- Specified by:
getLocalizableMessage
in interfaceLocalizableException
- Returns:
LocalizableMessage
object of this exception.- Since:
- MicroStrategy Web 8.0.0
-
getDefaultLocale
public java.util.Locale getDefaultLocale()
Returns default locale of this exception.- Specified by:
getDefaultLocale
in interfaceLocalizableException
- Returns:
- default locale of this exception.
- Since:
- MicroStrategy Web 8.0.0
-
setDefaultLocale
public void setDefaultLocale(java.util.Locale locale)
Sets the default locale of this exception.- Specified by:
setDefaultLocale
in interfaceLocalizableException
- Parameters:
locale
- new default locale- Since:
- MicroStrategy Web 8.0.0
-
-