Exception Tracking
Usage Intelligence is able to collect runtime exceptions from your application and then produce reports on the exceptions that were collected. Once an exception is tracked, Usage Intelligence will also save a snapshot of the current machine architecture so that you can later (through the on-line exception browser within the Usage Intelligence dashboard) investigate the exception details and pinpoint any specific OS or architecture related information that are the cause of common exceptions.
The collection of exception data is done through the trackException: function
The trackException: function is used to track and report on any exceptions that are generated by your application on the end users’ machines.
(RUIRESULTOBJC) trackException: (RUIExceptionEventOBJC*)event sessionID: (NSString*)sessionID
Parameters
The trackException: function has the following parameters.
Parameter |
Description |
event (RUIExceptionEventOBJC*) |
A type (defined below) that contains the exception event information. @interface RUIExceptionEventOBJC : NSObject <NSCopying> @property(nonatomic, copy) NSString* className; @property(nonatomic, copy) NSString* methodName; @property(nonatomic, copy) NSString* exceptionMessage; @property(nonatomic, copy) NSString* stackTrace; -(id)init; -(id)initWithClassName:(NSString*)className methodName:(NSString*)methodName exceptionMessage:(NSString*)exceptionMessage stackTrace:(NSString*)stackTrace; -(id)copyWithZone:(NSZone*)zone; -(void)dealloc; @end |
sessionID (NSString*) |
Session ID if exception is associated with a specific session. Send NULL if not required. |
Returns
The trackException: function returns one of the return status constants below.
Return |
Description |
RUI_OK |
Synchronous functionality successful. |
RUI_SDK_INTERNAL_ERROR_FATAL |
Irrecoverable internal fatal error. No further API calls should be made. |
RUI_SDK_ABORTED |
A required New Registration has failed, and hence the SDK is aborted. stopSDK: and Objective-C instance release are possible. |
RUI_SDK_SUSPENDED |
The Server has instructed a temporary back-off. |
RUI_SDK_PERMANENTLY_DISABLED |
The Server has instructed a permanent disable. |
RUI_SDK_OPTED_OUT |
Instance has been instructed by the application to opt-out. |
RUI_CONFIG_NOT_CREATED |
Configuration has not been successfully created. |
RUI_SDK_NOT_STARTED |
SDK has not been successfully started. |
RUI_SDK_ALREADY_STOPPED |
SDK has already been successfully stopped. |
RUI_INVALID_SESSION_ID_EXPECTED_EMPTY |
The sessionID is expected to be empty, and it was not. |
RUI_INVALID_SESSION_ID_TOO_SHORT |
The sessionID violates its allowable minimum length. |
RUI_INVALID_SESSION_ID_TOO_LONG |
The sessionID violates its allowable maximum length. |
RUI_INVALID_SESSION_ID_NOT_ACTIVE |
The sessionID is not currently in use. |
RUI_INVALID_PARAMETER_EXPECTED_NON_EMPTY |
Some API parameter is expected to be non-empty, and is not. |