|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.opencms.main.CmsException
public class CmsException
Master exception type for all exceptions caused in OpenCms.
| Field Summary | |
|---|---|
protected CmsMessageContainer |
m_message
The container for the localized message. |
| Constructor Summary | |
|---|---|
CmsException(CmsMessageContainer message)
Creates a new localized Exception. |
|
CmsException(CmsMessageContainer message,
Throwable cause)
Creates a new localized Exception that also containers a root cause. |
|
| Method Summary | |
|---|---|
CmsException |
createException(CmsMessageContainer container,
Throwable cause)
Creates a copied instance of this localized exception. |
static String |
getFormattedErrorstack(Throwable t)
Returns the HTML formatted error stack of a Throwable. |
String |
getLocalizedMessage()
Returns a localized exception message based on the OpenCms default locale. |
String |
getLocalizedMessage(Locale locale)
Returns a localized exception message based on the given Locale. |
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 String |
getStackTraceAsString(Throwable e)
Returns the stack trace (including the message) of an exception as a String. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected CmsMessageContainer m_message
| Constructor Detail |
|---|
public CmsException(CmsMessageContainer message)
message - the localized message container to use
public CmsException(CmsMessageContainer message,
Throwable cause)
message - the localized message container to usecause - the Exception root cause| Method Detail |
|---|
public static String getFormattedErrorstack(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 from
public static String getStackTraceAsString(Throwable e)
If the exception is a CmsException, also writes the root cause to the String.
e - the exception to get the stack trace from
public CmsException createException(CmsMessageContainer container,
Throwable cause)
container - the message containercause - the root cause
public String getLocalizedMessage()
I_CmsThrowable
getLocalizedMessage in interface I_CmsThrowablegetLocalizedMessage in class ThrowableI_CmsThrowable.getLocalizedMessage()public String getLocalizedMessage(Locale locale)
I_CmsThrowable
getLocalizedMessage in interface I_CmsThrowablelocale - the Locale to get the message for
I_CmsThrowable.getLocalizedMessage(Locale)public String getMessage()
I_CmsThrowable
getMessage in interface I_CmsThrowablegetMessage in class ThrowableThrowable.getMessage()public CmsMessageContainer getMessageContainer()
I_CmsThrowable
getMessageContainer in interface I_CmsThrowableI_CmsThrowable.getMessageContainer()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||