javax.microedition.content
Class ContentHandlerException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by javax.microedition.content.ContentHandlerException

public 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.

Since:
BlackBerry API 4.3.0

Field Summary
static int AMBIGUOUS
          The reason is AMBIGUOUS in a ContentHandlerException when an ID does not uniquely identify a single content handler application.
static int NO_REGISTERED_HANDLER
          The 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.
static int TYPE_UNKNOWN
          The reason is TYPE_UNKNOWN in a ContentHandlerException when the type is not available.
 
Constructor Summary
ContentHandlerException(String reason, int errcode)
          Constructs a ContentHandlerException with a reason and error code.
 
Method Summary
 int getErrorCode()
          Returns the error code for the exception.
 
Methods inherited from class java.lang.Throwable
getMessage, printStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 



Field Detail

NO_REGISTERED_HANDLER

public static final int NO_REGISTERED_HANDLER
The 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.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

TYPE_UNKNOWN

public static final int TYPE_UNKNOWN
The reason is TYPE_UNKNOWN in a ContentHandlerException when the type is not available.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0

AMBIGUOUS

public static final int AMBIGUOUS
The reason is AMBIGUOUS in a ContentHandlerException when an ID does not uniquely identify a single content handler application.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0


Constructor Detail

ContentHandlerException

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 java.lang.Throwable.getMessage method.

Parameters:
reason - the reason for the exception
errcode - the error code; one of ContentHandlerException.NO_REGISTERED_HANDLER, ContentHandlerException.AMBIGUOUS, or ContentHandlerException.TYPE_UNKNOWN
Throws:
IllegalArgumentException - if errcode is not one of ContentHandlerException.NO_REGISTERED_HANDLER, ContentHandlerException.AMBIGUOUS, or ContentHandlerException.TYPE_UNKNOWN
Since:
BlackBerry API 4.3.0


Method Detail

getErrorCode

public int getErrorCode()
Returns the error code for the exception.

Returns:
the error code; one of ContentHandlerException.NO_REGISTERED_HANDLER, ContentHandlerException.AMBIGUOUS, or ContentHandlerException.TYPE_UNKNOWN
Since:
BlackBerry API 4.3.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.