• BlackBerry Dynamics
  • Runtime library for Android applications
  • 10.0.0.93
GDServiceError Class Reference

AppKinetics Error. More...

Inherits Object.

Description

An error of this class may be encountered when the application is utilizing AppKinetics.

Errors of this class can originate within the AppKinetics system itself, or within service provider applications, which operate using AppKinetics.

For an overall description of AppKinetics see the icc package reference.

An error of this class could be received as the results object in an invocation of GDServiceClientListener.onReceiveMessage where a request that had been accepted subsequently failed in the AppKinetics system or in the service provider.

An error of this class can be passed as the results object when an application that is a service provider calls the replyTo (GDService) method.

An error of this class can have an AppKinetics system error code, or a service custom error code. See the constructor documentation, below.

Public Member Functions

GDServiceErrorCode getErrorCode ()
 Get the error code. More...
 
int getCustomErrorCode ()
 Get the custom error code, if any. More...
 
Object getDetails ()
 Get the additional error details, if any. More...
 
String getMessage ()
 Get the error message, if any. More...
 
 GDServiceError (GDServiceErrorCode errorCode)
 Constructor for an instance with a system error code. More...
 
 GDServiceError (int customErrorCode, String errorMessage, Object details) throws IllegalArgumentException
 Constructor for an instance with a custom error code. More...
 

Constructor & Destructor Documentation

◆ GDServiceError() [1/2]

Call this constructor to create an instance with an AppKinetics system error code.

The returned object is suitable for use with the replyTo (GDService) method.

Parameters
errorCodeError code to set. See GDServiceListener.onReceiveMessage for details of when each code must be used.

◆ GDServiceError() [2/2]

GDServiceError ( int  customErrorCode,
String  errorMessage,
Object  details 
) throws IllegalArgumentException

Call this constructor to create an instance with a custom error code.

The returned object is suitable for use with the replyTo (GDService) method.

Parameters
customErrorCodeError code to set. Details of what custom codes can be returned in a service response should be documented in the service definition.
errorMessageString containing an error message, or null not to include an error message. If there is a message, then the text should be suitable for display to an end user, at least for diagnostic purposes.
detailsObject containing the additional error details, or null. The service definition should specify what additional error details, if any, are sent with which custom error codes.

Member Function Documentation

◆ getErrorCode()

GDServiceErrorCode getErrorCode ( )
Returns
A system error code, or GDServiceErrorCustom if a custom error occurred.

◆ getCustomErrorCode()

int getCustomErrorCode ( )
Returns
The custom error code if there was one, or zero otherwise.

◆ getDetails()

Object getDetails ( )
Returns
Object containing the additional error details, or null if there are no additional details.

◆ getMessage()

String getMessage ( )
Returns
String containing the error message, or null if there was no message.