Package org.apache.xml.resolver
Class CatalogException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.xml.resolver.CatalogException
- All Implemented Interfaces:
Serializable
Signal Catalog exception.
This exception is thrown if an error occurs loading a catalog file.
- Version:
- 1.0
- Author:
- Norman Walsh Norman.Walsh@Sun.COM
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
An invalid entrystatic final int
An invalid entry typestatic final int
Could not instantiate an XML parserstatic final int
XML but parse failedstatic final int
Text catalog ended in mid-commentstatic final int
Unknown XML formatstatic final int
Unparseable XML catalog (not XML)static final int
A wrapper around another exception -
Constructor Summary
ConstructorsConstructorDescriptionCatalogException
(int type) Create a new CatalogException.CatalogException
(int type, String message) Create a new CatalogException.Create a new CatalogException wrapping an existing exception.CatalogException
(String message, Exception e) Create a new CatalogException from an existing exception. -
Method Summary
Modifier and TypeMethodDescriptionReturn the embedded exception, if any.int
Return the exception typeReturn a detail message for this exception.toString()
Override toString to pick up any embedded exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
WRAPPER
public static final int WRAPPERA wrapper around another exception- See Also:
-
INVALID_ENTRY
public static final int INVALID_ENTRYAn invalid entry- See Also:
-
INVALID_ENTRY_TYPE
public static final int INVALID_ENTRY_TYPEAn invalid entry type- See Also:
-
NO_XML_PARSER
public static final int NO_XML_PARSERCould not instantiate an XML parser- See Also:
-
UNKNOWN_FORMAT
public static final int UNKNOWN_FORMATUnknown XML format- See Also:
-
UNPARSEABLE
public static final int UNPARSEABLEUnparseable XML catalog (not XML)- See Also:
-
PARSE_FAILED
public static final int PARSE_FAILEDXML but parse failed- See Also:
-
UNENDED_COMMENT
public static final int UNENDED_COMMENTText catalog ended in mid-comment- See Also:
-
-
Constructor Details
-
CatalogException
Create a new CatalogException.- Parameters:
type
- The exception typemessage
- The error or warning message.
-
CatalogException
public CatalogException(int type) Create a new CatalogException.- Parameters:
type
- The exception type
-
CatalogException
Create a new CatalogException wrapping an existing exception.The existing exception will be embedded in the new one, and its message will become the default message for the CatalogException.
- Parameters:
e
- The exception to be wrapped in a CatalogException.
-
CatalogException
Create a new CatalogException from an existing exception.The existing exception will be embedded in the new one, but the new exception will have its own message.
- Parameters:
message
- The detail message.e
- The exception to be wrapped in a CatalogException.
-
-
Method Details
-
getMessage
Return a detail message for this exception.If there is an embedded exception, and if the CatalogException has no detail message of its own, this method will return the detail message from the embedded exception.
- Overrides:
getMessage
in classThrowable
- Returns:
- The error or warning message.
-
getException
Return the embedded exception, if any.- Returns:
- The embedded exception, or null if there is none.
-
getExceptionType
public int getExceptionType()Return the exception type- Returns:
- The exception type
-
toString
Override toString to pick up any embedded exception.
-