Class McdbException

java.lang.Object
java.lang.Throwable
java.lang.Exception
edu.ucsb.nceas.metacat.McdbException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
McdbDocNotFoundException

public class McdbException extends Exception
Exception thrown when an error occurs because a problem occurred in the metacat database. This is the general type of Exception that is thrown whenever the server encounters an Error or Exception that is outside of the scope of normal operation. This class may be subclassed to provide more detailed informatin about the error.
See Also:
  • Constructor Details

    • McdbException

      public McdbException()
      Create a new McdbException.
    • McdbException

      public McdbException(String message)
      Create a new McdbException.
      Parameters:
      message - The error or warning message.
    • McdbException

      public McdbException(Exception e)
      Create a new McdbException.
      Parameters:
      e - The exception to tunnel inside this exception
    • McdbException

      public McdbException(String message, Exception e)
      Create a new McdbException.
      Parameters:
      message - The error or warning message.
      e - The exception to tunnel inside this exception
  • Method Details

    • getException

      public Exception getException()
      Get the tunneled Exception
    • getMessage

      public String getMessage()
      Get the message from this exception.

      This returns the message from this exception, but if it is null, and if the tunnelled exception is not null, then it returns the message fromthe tunnelled exception.

      Overrides:
      getMessage in class Throwable
    • toXml

      public void toXml(Writer pw)
      Print the message from this exception in XML format.

      This returns the message from this exception, but if it is null, and if the tunnelled exception is not null, then it returns the message from the tunnelled exception.