PDAP Public Review Draft

javax.microedition.pim
Class PIMException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.microedition.pim.PIMException

public class PIMException
extends java.lang.Exception

Represents exceptions thrown by the PIM classes. This class has a reason code optionally associated with it to provide more information about the PIM exception that occurred.

Since:
PDAP 1.0

Field Summary
static int FEATURE_NOT_SUPPORTED
          Indicates a PIM exception where the functionality is not supported in this implementation.
Value 1 is assigned to FEATURE_NOT_SUPPORTED.
static int GENERAL_ERROR
          Indicates a general PIM exception error.
static int LIST_CLOSED
          Indicates a PIM exception where a list is closed and access is attempte on it.
Value 4 is assigned to LIST_CLOSED.
static int LIST_NOT_ACCESSIBLE
          Indicates a PIM exception where a list is no longer accessible by the application, such as if the underlying PIM database is deleted.
Value 3 is assigned to LIST_NOT_ACCESSIBLE.
static int UPDATE_ERROR
          Indicates a PIM exception where the update could not continue.
Value 2 is assigned to UPDATE_ERROR.
 
Constructor Summary
PIMException()
          Constructs a new instance of this class with its stacktrace filled in.
PIMException(java.lang.String detailMessage)
          Constructs a new instance of this class with its stacktrace and message filled in.
PIMException(java.lang.String detailMessage, int reason)
          Constructs a new instance of this class with its stacktrace, message, and reason filled in.
 
Method Summary
 int getReason()
          Returns the reason for the PIM 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

GENERAL_ERROR

public static final int GENERAL_ERROR
Indicates a general PIM exception error. This is the default value for the reason code.
Value 0 is assigned to GENERAL_ERROR.

FEATURE_NOT_SUPPORTED

public static final int FEATURE_NOT_SUPPORTED
Indicates a PIM exception where the functionality is not supported in this implementation.
Value 1 is assigned to FEATURE_NOT_SUPPORTED.

UPDATE_ERROR

public static final int UPDATE_ERROR
Indicates a PIM exception where the update could not continue.
Value 2 is assigned to UPDATE_ERROR.

LIST_NOT_ACCESSIBLE

public static final int LIST_NOT_ACCESSIBLE
Indicates a PIM exception where a list is no longer accessible by the application, such as if the underlying PIM database is deleted.
Value 3 is assigned to LIST_NOT_ACCESSIBLE.

LIST_CLOSED

public static final int LIST_CLOSED
Indicates a PIM exception where a list is closed and access is attempte on it.
Value 4 is assigned to LIST_CLOSED.
Constructor Detail

PIMException

public PIMException()
Constructs a new instance of this class with its stacktrace filled in.

PIMException

public PIMException(java.lang.String detailMessage)
Constructs a new instance of this class with its stacktrace and message filled in.
Parameters:
detailMessage - String The detail message for the exception.

PIMException

public PIMException(java.lang.String detailMessage,
                    int reason)
Constructs a new instance of this class with its stacktrace, message, and reason filled in.
Parameters:
detailMessage - String The detail message for the exception.
reason - int Integer representing the reason for the exception.
Method Detail

getReason

public int getReason()
Returns the reason for the PIM Exception. The int returned is one of the values PIMException.PIM_* defined in this class.
Returns:
int reason for the exception.

PDAP 1.0 Spec, Rev. 0.16