Class MCRException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MCRAccessKeyException, MCRConfigurationException, MCRParseException, MCRPersistenceException, MCRUsageException

public class MCRException extends RuntimeException
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 Details

    • MCRException

      public MCRException(String message)
      Creates a new MCRException with an error message
      Parameters:
      message - the error message for this exception
    • MCRException

      public MCRException(Throwable cause)
    • MCRException

      public MCRException(String message, Throwable cause)
      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 exception
      cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
  • Method Details

    • getStackTraceAsString

      public String getStackTraceAsString()
      Returns a String containing the invocation stack trace for this exception
      Returns:
      a String containing the invocation stack trace for this exception
    • getStackTraceAsString

      public static String getStackTraceAsString(Throwable ex)
      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