CatalogExceptionpublic class CatalogException extends Exception Signal Catalog exception.
This exception is thrown if an error occurs loading a
catalog file. |
Fields Summary |
---|
public static final int | WRAPPERA wrapper around another exception | public static final int | INVALID_ENTRYAn invalid entry | public static final int | INVALID_ENTRY_TYPEAn invalid entry type | public static final int | NO_XML_PARSERCould not instantiate an XML parser | public static final int | UNKNOWN_FORMATUnknown XML format | public static final int | UNPARSEABLEUnparseable XML catalog (not XML) | public static final int | PARSE_FAILEDXML but parse failed | public static final int | UNENDED_COMMENTText catalog ended in mid-comment | private Exception | exceptionThe embedded exception if tunnelling, or null. | private int | exceptionType |
Constructors Summary |
---|
public CatalogException(int type, String message)Create a new CatalogException.
super(message);
this.exceptionType = type;
this.exception = null;
| public CatalogException(int type)Create a new CatalogException.
super("Catalog Exception " + type);
this.exceptionType = type;
this.exception = null;
| public CatalogException(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.
super();
this.exceptionType = WRAPPER;
this.exception = e;
| public CatalogException(String message, 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.
super(message);
this.exceptionType = WRAPPER;
this.exception = e;
|
Methods Summary |
---|
public java.lang.Exception | getException()Return the embedded exception, if any.
return exception;
| public int | getExceptionType()Return the exception type
return exceptionType;
| 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.
String message = super.getMessage();
if (message == null && exception != null) {
return exception.getMessage();
} else {
return message;
}
| public java.lang.String | toString()Override toString to pick up any embedded exception.
if (exception != null) {
return exception.toString();
} else {
return super.toString();
}
|
|