sendException

The sendException() method records a caught exception or error as a custom event. The event uses the category Exception, the action Exception registered, and your description as the event name.

Syntax

PiwikTracker.sharedInstance()?.sendException(description: "description")
[[PiwikTracker sharedInstance] sendExceptionWithDescription:@"description"];

Parameters

  • description (string, required)
    A short description of the issue. If the description is longer than 50 characters, the SDK truncates it before sending.

Examples

To send a caught exception:

PiwikTracker.sharedInstance()?.sendException(description: "Download error")
[[PiwikTracker sharedInstance] sendExceptionWithDescription:@"Download error"];

Notes

  • In Analytics, this event appears with other custom events under the category Exception and action Exception registered. Use the description value as the event name when filtering or building reports.

Related methods


Did this page help you?