Package org.apache.xml.resolver
Class CatalogException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.xml.resolver.CatalogException
-
- All Implemented Interfaces:
java.io.Serializable
public class CatalogException extends java.lang.Exception
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:
Catalog
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
INVALID_ENTRY
An invalid entrystatic int
INVALID_ENTRY_TYPE
An invalid entry typestatic int
NO_XML_PARSER
Could not instantiate an XML parserstatic int
PARSE_FAILED
XML but parse failedstatic int
UNENDED_COMMENT
Text catalog ended in mid-commentstatic int
UNKNOWN_FORMAT
Unknown XML formatstatic int
UNPARSEABLE
Unparseable XML catalog (not XML)static int
WRAPPER
A wrapper around another exception
-
Constructor Summary
Constructors Constructor Description CatalogException(int type)
Create a new CatalogException.CatalogException(int type, java.lang.String message)
Create a new CatalogException.CatalogException(java.lang.Exception e)
Create a new CatalogException wrapping an existing exception.CatalogException(java.lang.String message, java.lang.Exception e)
Create a new CatalogException from an existing exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Exception
getException()
Return the embedded exception, if any.int
getExceptionType()
Return the exception typejava.lang.String
getMessage()
Return a detail message for this exception.java.lang.String
toString()
Override toString to pick up any embedded exception.
-
-
-
Field Detail
-
WRAPPER
public static final int WRAPPER
A wrapper around another exception- See Also:
- Constant Field Values
-
INVALID_ENTRY
public static final int INVALID_ENTRY
An invalid entry- See Also:
- Constant Field Values
-
INVALID_ENTRY_TYPE
public static final int INVALID_ENTRY_TYPE
An invalid entry type- See Also:
- Constant Field Values
-
NO_XML_PARSER
public static final int NO_XML_PARSER
Could not instantiate an XML parser- See Also:
- Constant Field Values
-
UNKNOWN_FORMAT
public static final int UNKNOWN_FORMAT
Unknown XML format- See Also:
- Constant Field Values
-
UNPARSEABLE
public static final int UNPARSEABLE
Unparseable XML catalog (not XML)- See Also:
- Constant Field Values
-
PARSE_FAILED
public static final int PARSE_FAILED
XML but parse failed- See Also:
- Constant Field Values
-
UNENDED_COMMENT
public static final int UNENDED_COMMENT
Text catalog ended in mid-comment- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CatalogException
public CatalogException(int type, java.lang.String message)
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
public CatalogException(java.lang.Exception e)
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
public CatalogException(java.lang.String message, java.lang.Exception e)
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 Detail
-
getMessage
public java.lang.String 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 classjava.lang.Throwable
- Returns:
- The error or warning message.
-
getException
public java.lang.Exception 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
public java.lang.String toString()
Override toString to pick up any embedded exception.- Overrides:
toString
in classjava.lang.Throwable
- Returns:
- A string representation of this exception.
-
-