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.

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

Since:
PDAP 1.0
See Also:
FieldFullException, FieldEmptyException

Field Summary
static int FEATURE_NOT_SUPPORTED
          Represents the constant indicating that the specified feature is not yet supported.
static int GENERAL_ERROR
          Indicates that a general error has occured.
static int LIST_CLOSED
          Indicates that the specified list has been closed.
static int LIST_NOT_ACCESSIBLE
          Indicates that the specified list cannot be accessed.
static int MAX_CATEGORIES_EXCEEDED
          A constant indicating that the maximum number of categories for this list has been exceeded.
static int UNSUPPORTED_VERSION
          A constant indicating that an unsupported version has been encountered.
static int UPDATE_ERROR
          A constant indicating that an error occured while updating PIM information.
 
Constructor Summary
PIMException()
          Creates a new PIMException instance.
PIMException(String detailMessage)
          Creates a new PIMException instance given a detailed message about the error that caused the exception to be thrown.
PIMException(String detailMessage, int reason)
          Creates a new PIMException instance given a detailed message about the error that caused the exception to be thrown and the field that caused the exception.
 
Method Summary
 int getReason()
          Returns an integer indicating the reason that the exception was thrown.
 
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
Represents the constant indicating that the specified feature is not yet supported.

This constant corresponds to the current exception and can be returned using the getReason method.

Since:
JDE 4.0.0

GENERAL_ERROR

public static final int GENERAL_ERROR
Indicates that a general error has occured.

This constant corresponds to the current exception and can be returned using the getReason method.

Since:
JDE 4.0.0

LIST_CLOSED

public static final int LIST_CLOSED
Indicates that the specified list has been closed.

When a list is closed it can no longer be accessed.

This constant corresponds to the current exception and can be returned using the getReason method.

Since:
JDE 4.0.0

LIST_NOT_ACCESSIBLE

public static final int LIST_NOT_ACCESSIBLE
Indicates that the specified list cannot be accessed.

This constant corresponds to the current exception and can be returned using the getReason method.

Since:
JDE 4.0.0

MAX_CATEGORIES_EXCEEDED

public static final int MAX_CATEGORIES_EXCEEDED
A constant indicating that the maximum number of categories for this list has been exceeded.

This constant corresponds to the current exception and can be returned using the getReason method.

Since:
JDE 4.0.0

UNSUPPORTED_VERSION

public static final int UNSUPPORTED_VERSION
A constant indicating that an unsupported version has been encountered.

This constant corresponds to the current exception and can be returned using the getReason method.

Since:
JDE 4.0.0

UPDATE_ERROR

public static final int UPDATE_ERROR
A constant indicating that an error occured while updating PIM information.

This constant corresponds to the current exception and can be returned using the getReason method.

Since:
JDE 4.0.0
Constructor Detail

PIMException

public PIMException()
Creates a new PIMException instance.
Since:
JDE 4.0.0

PIMException

public PIMException(String detailMessage)
Creates a new PIMException instance given a detailed message about the error that caused the exception to be thrown.

Parameters:
detailMessage - A detailed message explaining what caused the exception to be thrown.
Since:
JDE 4.0.0

PIMException

public PIMException(String detailMessage,
                    int reason)
Creates a new PIMException instance given a detailed message about the error that caused the exception to be thrown and the field that caused the exception.

Parameters:
detailMessage - A detailed message explaining what caused the exception to be thrown.
field - An integer representing the field that caused the exception to be thrown.
Since:
JDE 4.0.0
Method Detail

getReason

public int getReason()
Returns an integer indicating the reason that the exception was thrown.

The integer corresponds to a reason.

Returns:
An integer representing the reason why the exception was thrown.
Since:
JDE 4.0.0



Copyright 1999-2008 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.