net.rimlib.blackberry.api.paymentsdk
Class PaymentException
java.lang.Object
java.lang.Throwable
java.lang.Exception
net.rimlib.blackberry.api.paymentsdk.PaymentException
- All Implemented Interfaces:
- java.io.Serializable, ResultCodes
- Direct Known Subclasses:
- AppWorldUpdateRequired, DigitalGoodNotFoundException, IllegalApplicationException, PaymentServerException, UserCancelException
public class PaymentException
- extends java.lang.Exception
- implements ResultCodes
Thrown when a generic failure occurs with one of the PaymentEngine
methods. Since all other exceptions specified in the Payment Service API are
subclasses of PaymentException, if you want to handle all exceptions the same
way, you only need to catch PaymentException to do so. If you want to handle
each exception uniquely, you can catch PaymentServerException,
DigitalGoodNotFoundException, UserCancelException, and
IllegalApplicationException separately.
- See Also:
- Serialized Form
|
Constructor Summary |
PaymentException(java.lang.String message)
Creates an exception with the given detail message. |
PaymentException(java.lang.String message,
int failureReasonIn)
Creates an exception with the given detail message. |
|
Method Summary |
int |
getFailureReason()
Retrieves a constant representing the reason this result is unsuccessful, or REASON_NONE
if this result is successful. |
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PaymentException
public PaymentException(java.lang.String message)
- Creates an exception with the given detail message.
- Parameters:
message - The detail message.
PaymentException
public PaymentException(java.lang.String message,
int failureReasonIn)
- Creates an exception with the given detail message.
- Parameters:
message - The detail message.failureReasonIn - One of the REASON_* constants in this interface .
getFailureReason
public int getFailureReason()
- Retrieves a constant representing the reason this result is unsuccessful, or
REASON_NONE
if this result is successful.
- Returns:
- One of the
REASON_* constants. If this result is successful, then REASON_NONE
is returned.
Copyright © 2011 Research In Motion Limited. All Rights Reserved.