Package edu.ucsb.nceas.metacat
Class McdbException
java.lang.Object
java.lang.Throwable
java.lang.Exception
edu.ucsb.nceas.metacat.McdbException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
McdbDocNotFoundException
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 Summary
ConstructorDescriptionCreate a new McdbException.Create a new McdbException.McdbException
(String message) Create a new McdbException.McdbException
(String message, Exception e) Create a new McdbException. -
Method Summary
Modifier and TypeMethodDescriptionGet the tunneled ExceptionGet the message from this exception.void
Print the message from this exception in XML format.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
McdbException
public McdbException()Create a new McdbException. -
McdbException
Create a new McdbException.- Parameters:
message
- The error or warning message.
-
McdbException
Create a new McdbException.- Parameters:
e
- The exception to tunnel inside this exception
-
McdbException
Create a new McdbException.- Parameters:
message
- The error or warning message.e
- The exception to tunnel inside this exception
-
-
Method Details
-
getException
Get the tunneled Exception -
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 classThrowable
-
toXml
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.
-