javax.microedition.pim
Class PIMException

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

public class PIMException
extends 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.

The PDA Profile specification (JSR-75) for the J2ME(TM) Platform

For more information about this class or about the personal information management (PIM) API, see The PDA Profile specification (JSR-000075) for the J2ME(TM) Platform.

Since:
PIM 1.0

Field Summary
static int FEATURE_NOT_SUPPORTED
          Indicates a PIM exception where the functionality is not supported in this implementation.
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 attempted.
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.
static int MAX_CATEGORIES_EXCEEDED
          Indicates the max number of categories is exceeded.
static int UNSUPPORTED_VERSION
          Indicates the data is in an unsupported PIM version.
static int UPDATE_ERROR
          Indicates a PIM exception where the update could not continue.
 
Constructor Summary
PIMException()
          Constructs a new instance of this class with its stack trace filled in.
PIMException(String detailMessage)
          Constructs a new instance of this class with its stack trace and message filled in.
PIMException(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

FEATURE_NOT_SUPPORTED

public static final int FEATURE_NOT_SUPPORTED
Indicates a PIM exception where the functionality is not supported in this implementation.
Since:
JDE 4.0.0

GENERAL_ERROR

public static final int GENERAL_ERROR
Indicates a general PIM exception error. This is the default value for the reason code.
Since:
JDE 4.0.0

LIST_CLOSED

public static final int LIST_CLOSED
Indicates a PIM exception where a list is closed and access is attempted.
Since:
JDE 4.0.0

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.
Since:
JDE 4.0.0

MAX_CATEGORIES_EXCEEDED

public static final int MAX_CATEGORIES_EXCEEDED
Indicates the max number of categories is exceeded.
Since:
JDE 4.0.0

UNSUPPORTED_VERSION

public static final int UNSUPPORTED_VERSION
Indicates the data is in an unsupported PIM version.
Since:
JDE 4.0.0

UPDATE_ERROR

public static final int UPDATE_ERROR
Indicates a PIM exception where the update could not continue.
Since:
JDE 4.0.0
Constructor Detail

PIMException

public PIMException()
Constructs a new instance of this class with its stack trace filled in. The reason code for this exception is set to the default value of GENERAL_ERROR.
Since:
JDE 4.0.0

PIMException

public PIMException(String detailMessage)
Constructs a new instance of this class with its stack trace and message filled in. The reason code for this exception is set to the default value of GENERAL_ERROR.
Parameters:
detailMessage - The detail message for the exception.
Since:
JDE 4.0.0

PIMException

public PIMException(String detailMessage,
                    int reason)
Constructs a new instance of this class with its stacktrace, message, and reason filled in.
Parameters:
detailMessage - The detail message for the exception.
reason - the reason for the exception; should be one of the integer constants defined in this class; this value will be returned from getReason().
Since:
JDE 4.0.0
Method Detail

getReason

public int getReason()
Returns the reason for the PIM Exception. The value returned is one of the static error reason values defined in this class.
Returns:
An integer representing the reason why the exception was thrown; returns GENERAL_ERROR if no reason was specified to the constructor.
Since:
JDE 4.0.0



Copyright 1999-2009 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.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.