sendException

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

Syntax

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

Parameters

  • description string, required - Short description of the issue. If longer than 50 characters, the SDK truncates the text to 50 characters before sending.

Examples

To send a caught exception:

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

Notes

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

Related methods