Package org.mycore.common
Class MCRException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.mycore.common.MCRException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MCRAccessKeyException
,MCRConfigurationException
,MCRParseException
,MCRPersistenceException
,MCRUsageException
Instances of this class represent a general exception thrown by any part of
the MyCoRe implementation classes.
- Version:
- $Revision$ $Date$
- Author:
- Jens Kupferschmidt, Frank Lützenkirchen
- See Also:
-
Constructor Summary
ConstructorDescriptionMCRException
(String message) Creates a new MCRException with an error messageMCRException
(String message, Throwable cause) Creates a new MCRException with an error message and a reference to an exception thrown by an underlying system.MCRException
(Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionReturns a String containing the invocation stack trace for this exceptionstatic String
Returns a String containing the invocation stack trace of an exceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MCRException
Creates a new MCRException with an error message- Parameters:
message
- the error message for this exception
-
MCRException
-
MCRException
Creates a new MCRException with an error message and a reference to an exception thrown by an underlying system. Normally, this exception will be the cause why we would throw an MCRException, e. g. when something in the datastore goes wrong.- Parameters:
message
- the error message for this exceptioncause
- the cause (which is saved for later retrieval by theThrowable.getCause()
method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
-
-
Method Details
-
getStackTraceAsString
Returns a String containing the invocation stack trace for this exception- Returns:
- a String containing the invocation stack trace for this exception
-
getStackTraceAsString
Returns a String containing the invocation stack trace of an exception- Parameters:
ex
- the exception you want the stack trace of- Returns:
- the invocation stack trace of an exception
-