|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--com.opencms.core.CmsException
This class provides OpenCms interal Exception handling. A CmsExeption thrown will result in a default OpenCms error dialog box.
Note: Most Exceptions thrown in templates and other classes will be converted to a CmsException by the template launcher.
| Field Summary | |
static int |
C_ACCESS_DENIED
Definition of error code for access denied exception for file resources. |
static int |
C_BAD_NAME
Definition of error code for bad name exception |
static int |
C_CLASSLOADER_ERROR
Definition of error code for launcher errors |
static String |
C_CMS_EXCEPTION_PREFIX
Default prefix for a CmsException message |
static String[] |
C_EXTXT
This array provides descriptions for the error codes stored as constants in the CmsExeption class. |
static int |
C_FILE_EXISTS
Definition of error code for file exists exception |
static int |
C_FILESYSTEM_ERROR
Definition of error code filesystem error |
static int |
C_FLEX_CACHE
Error code for Flex cache |
static int |
C_FLEX_LOADER
Error code for Flex loader |
static int |
C_FLEX_OTHER
Unspecified Flex error code |
static int |
C_GROUP_NOT_EMPTY
Definition of error code for group not empty exception |
static int |
C_HTTPS_PAGE_ERROR
Definition of error code for HTTP sreaming error |
static int |
C_HTTPS_REQUEST_ERROR
Definition of error code for HTTP sreaming error |
static int |
C_INTERNAL_FILE
Definition of error code internal file |
static int |
C_INVALID_PASSWORD
Definition of error code for error"Password not valid". |
static int |
C_LAUNCH_ERROR
Definition of error code for launcher errors |
static int |
C_LOCKED
Definition of error code for locked resource |
static int |
C_NO_ACCESS
Definition of error code for access denied exception for non file resources |
static int |
C_NO_DEFAULT_GROUP
Definition of error code for no default group exception |
static int |
C_NO_GROUP
Definition of error code for no group exception |
static int |
C_NO_USER
Definition of error code for no user exception |
static int |
C_NOT_ADMIN
Definition of error code for no admin exception |
static int |
C_NOT_EMPTY
Definition of error code for not empty exception |
static int |
C_NOT_FOUND
Definition of error code for not found exception |
static int |
C_RB_INIT_ERROR
Definition of error code for RB-INIT-ERRORS |
static int |
C_REGISTRY_ERROR
Definition of error code for Registry exception |
static int |
C_RESOURCE_DELETED
Definition of error code for accessing a deleted resource |
static int |
C_SERIALIZATION
Definition of error code for serialization exception |
static int |
C_SERVICE_UNAVAILABLE
Definition of error code service unavailable |
static int |
C_SHORT_PASSWORD
Definition of error code for error"Password too short" |
static int |
C_SQL_ERROR
Definition of error code for sql exception |
static int |
C_STREAMING_ERROR
Definition of error code for HTTP sreaming error |
static int |
C_UNKNOWN_EXCEPTION
Definition of error code for unknown exception |
static int |
C_USER_EXISTS
Definition of error code for user exists |
static int |
C_XML_CORRUPT_INTERNAL_STRUCTURE
Definition of error code for corrupt internal structure |
static int |
C_XML_NO_PROCESS_METHOD
Definition of error code for XML process method not found |
static int |
C_XML_NO_TEMPLATE_CLASS
Definition of error code for no XML template class |
static int |
C_XML_NO_USER_METHOD
Definition of error code for XML user method not found |
static int |
C_XML_PARSING_ERROR
Definition of error code for XML parsing error |
static int |
C_XML_PROCESS_ERROR
Definition of error code for XML processing error |
static int |
C_XML_TAG_MISSING
Definition of error code for missing XML tag |
static int |
C_XML_UNKNOWN_DATA
Definition of error code for unknown XML datablocks |
static int |
C_XML_WRONG_CONTENT_TYPE
Definition of error code for wrong XML content type |
static int |
C_XML_WRONG_TEMPLATE_CLASS
Definition of error code for wrong XML template class |
protected String |
m_message
A string message describing the CmsEception |
protected Throwable |
m_rootCause
Stores a forwared exception |
protected int |
m_type
Stores the error code of the CmsException |
protected boolean |
m_useRootCause
Flag to set processing of a saved forwared root exception |
| Constructor Summary | |
CmsException()
Constructs a simple CmsException |
|
CmsException(int type)
Contructs a CmsException with the provided error code, The error codes used should be the constants from the CmsEception class. |
|
CmsException(int type,
Throwable rootCause)
Contructs a CmsException with the provided error code and a given root cause. |
|
CmsException(String message)
Constructs a CmsException with the provided description. |
|
CmsException(String message,
int type)
Contructs a CmsException with the provided description and error code. |
|
CmsException(String message,
int type,
Throwable rootCause)
Creates a CmsException with the provided error code, a forwarded root cause exception and a detail message. |
|
CmsException(String message,
int type,
Throwable rootCause,
boolean useRoot)
Creates a CmsException with a provided error code, a forwarded root cause exception and a detail message. |
|
CmsException(String message,
Throwable rootCause)
Construtcs a CmsException with a detail message and a forwarded root cause exception |
|
| Method Summary | |
Exception |
getException()
Get the root cause Exception which was provided when this exception was thrown. |
String |
getMessage()
Get the exeption message |
Throwable |
getRootCause()
Get the root cause Throwable which was provided when this exception was thrown. |
String |
getShortException()
Get the exeption message |
String |
getStackTraceAsString()
Return a string with the stacktrace. for this exception and for all encapsulated exceptions. |
Throwable |
getThrowable()
Get the throwable. |
int |
getType()
Get the type of the CmsException. |
String |
getTypeText()
Gets the exception type as text. |
void |
printStackTrace()
Print the exception stack trace to System.out. |
void |
printStackTrace(PrintStream s)
Prints this Throwable and its backtrace to the
specified print stream. |
void |
printStackTrace(PrintWriter s)
Prints this Throwable and its backtrace to the specified
print writer. |
void |
setException(Throwable value)
Set the root cause Exception value. |
String |
toString()
Overwrites the standart toString method. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected int m_type
protected String m_message
protected Throwable m_rootCause
protected boolean m_useRootCause
public static final int C_UNKNOWN_EXCEPTION
public static final int C_NO_ACCESS
public static final int C_NOT_FOUND
public static final int C_BAD_NAME
public static final int C_SQL_ERROR
public static final int C_NOT_EMPTY
public static final int C_NOT_ADMIN
public static final int C_SERIALIZATION
public static final int C_NO_GROUP
public static final int C_GROUP_NOT_EMPTY
public static final int C_NO_USER
public static final int C_NO_DEFAULT_GROUP
public static final int C_FILE_EXISTS
public static final int C_LOCKED
public static final int C_FILESYSTEM_ERROR
public static final int C_INTERNAL_FILE
public static final int C_SERVICE_UNAVAILABLE
public static final int C_XML_UNKNOWN_DATA
public static final int C_XML_CORRUPT_INTERNAL_STRUCTURE
public static final int C_XML_WRONG_CONTENT_TYPE
public static final int C_XML_PARSING_ERROR
public static final int C_XML_PROCESS_ERROR
public static final int C_XML_NO_USER_METHOD
public static final int C_XML_NO_PROCESS_METHOD
public static final int C_XML_TAG_MISSING
public static final int C_XML_WRONG_TEMPLATE_CLASS
public static final int C_XML_NO_TEMPLATE_CLASS
public static final int C_LAUNCH_ERROR
public static final int C_CLASSLOADER_ERROR
public static final int C_SHORT_PASSWORD
public static final int C_INVALID_PASSWORD
public static final int C_ACCESS_DENIED
public static final int C_RESOURCE_DELETED
public static final int C_RB_INIT_ERROR
public static final int C_REGISTRY_ERROR
public static final int C_USER_EXISTS
public static final int C_STREAMING_ERROR
public static final int C_HTTPS_PAGE_ERROR
public static final int C_HTTPS_REQUEST_ERROR
public static final int C_FLEX_CACHE
public static final int C_FLEX_LOADER
public static final int C_FLEX_OTHER
public static final String C_CMS_EXCEPTION_PREFIX
public static final String[] C_EXTXT
| Constructor Detail |
public CmsException()
public CmsException(int type)
public CmsException(int type,
Throwable rootCause)
public CmsException(String message)
public CmsException(String message,
int type)
public CmsException(String message,
Throwable rootCause)
public CmsException(String message,
int type,
Throwable rootCause)
public CmsException(String message,
int type,
Throwable rootCause,
boolean useRoot)
useRoot parameter.
useRoot - If true, use| Method Detail |
public Exception getException()
public Throwable getRootCause()
public void setException(Throwable value)
value - The root cause Exceptionpublic Throwable getThrowable()
public String getMessage()
getMessage in class Throwablepublic String getShortException()
public String getStackTraceAsString()
public int getType()
public String getTypeText()
public void printStackTrace()
printStackTrace in class Throwablepublic void printStackTrace(PrintStream s)
Throwable and its backtrace to the
specified print stream.
printStackTrace in class Throwablepublic void printStackTrace(PrintWriter s)
Throwable and its backtrace to the specified
print writer.
printStackTrace in class Throwablepublic String toString()
toString in class Throwable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||