ContentHandlerExceptionpublic class ContentHandlerException extends IOException A ContentHandlerException is thrown to report errors
specific to registration and invocation of content handlers.
Instances are immutable and thread safe. |
Fields Summary |
---|
private int | errcodeThe error code. | public static final int | NO_REGISTERED_HANDLERThe reason is NO_REGISTERED_HANDLER in a
ContentHandlerException when there is no content handler
registered of the requested combination of
ID, type, suffix, and action. | public static final int | TYPE_UNKNOWNThe reason is TYPE_UNKNOWN in a
ContentHandlerException when the type is not available. | public static final int | AMBIGUOUSThe reason is AMBIGUOUS in a
ContentHandlerException when an ID does not
uniquely identify a single content handler application. |
Constructors Summary |
---|
public ContentHandlerException(String reason, int errcode)Constructs a ContentHandlerException with a reason
and error code.
The error message string reason can later be
retrieved by the
{@link java.lang.Throwable#getMessage java.lang.Throwable.getMessage}
method.
super(reason);
if (errcode < NO_REGISTERED_HANDLER ||
errcode > AMBIGUOUS) {
throw new IllegalArgumentException();
}
this.errcode = errcode;
|
Methods Summary |
---|
public int | getErrorCode()Returns the error code for the exception.
return errcode;
|
|