public class CmsException extends java.lang.Exception implements I_CmsThrowable
| 限定符和类型 | 字段和说明 |
|---|---|
protected CmsMessageContainer |
m_message
The container for the localized message.
|
| 构造器和说明 |
|---|
CmsException(CmsMessageContainer message)
Creates a new localized Exception.
|
CmsException(CmsMessageContainer message,
java.lang.Throwable cause)
Creates a new localized Exception that also containers a root cause.
|
| 限定符和类型 | 方法和说明 |
|---|---|
CmsException |
createException(CmsMessageContainer container,
java.lang.Throwable cause)
Creates a copied instance of this localized exception.
|
static java.lang.String |
getFormattedErrorstack(java.lang.Throwable t)
Returns the HTML formatted error stack of a Throwable.
|
java.lang.String |
getLocalizedMessage()
Returns a localized exception message based on the OpenCms default locale.
|
java.lang.String |
getLocalizedMessage(java.util.Locale locale)
Returns a localized exception message based on the given Locale.
|
java.lang.String |
getMessage()
Returns a localized exception message based on the OpenCms default locale.
|
CmsMessageContainer |
getMessageContainer()
Returns the localized message container used to build this localized exception.
|
static java.lang.String |
getStackTraceAsString(java.lang.Throwable e)
Returns the stack trace (including the message) of an exception as a String.
|
protected CmsMessageContainer m_message
public CmsException(CmsMessageContainer message)
message - the localized message container to usepublic CmsException(CmsMessageContainer message, java.lang.Throwable cause)
message - the localized message container to usecause - the Exception root causepublic static java.lang.String getFormattedErrorstack(java.lang.Throwable t)
The error stack is used by the common error screen that is displayed if an error occurs.
t - the throwable to get the errorstack frompublic static java.lang.String getStackTraceAsString(java.lang.Throwable e)
If the exception is a CmsException, also writes the root cause to the String.
e - the exception to get the stack trace frompublic CmsException createException(CmsMessageContainer container, java.lang.Throwable cause)
container - the message containercause - the root causepublic java.lang.String getLocalizedMessage()
I_CmsThrowablegetLocalizedMessage 在接口中 I_CmsThrowablegetLocalizedMessage 在类中 java.lang.ThrowableI_CmsThrowable.getLocalizedMessage()public java.lang.String getLocalizedMessage(java.util.Locale locale)
I_CmsThrowablegetLocalizedMessage 在接口中 I_CmsThrowablelocale - the Locale to get the message forI_CmsThrowable.getLocalizedMessage(Locale)public java.lang.String getMessage()
I_CmsThrowablegetMessage 在接口中 I_CmsThrowablegetMessage 在类中 java.lang.ThrowableThrowable.getMessage()public CmsMessageContainer getMessageContainer()
I_CmsThrowablegetMessageContainer 在接口中 I_CmsThrowableI_CmsThrowable.getMessageContainer()