AppMetricaPluginReporting protocol
The AppMetricaPluginReporting
protocol is an extension of AppMetricaCrashReporting
.
You can get an instance of the object that implements AppMetricaPluginReporting
by calling the pluginExtension method in AppMetricaCrashReporting.
One AppMetricaPluginReporting
instance is created for each reporter. You can request it every time or store a reference for future use.
Instance methods
Sends a message about an unhandled error. |
|
Sends an error message. |
|
Sends an error message with a short description. |
Method descriptions
reportUnhandledException(_:onFailure:)
class func reportUnhandledException(_ errorDetails: PluginErrorDetails?, onFailure: ((_ error: (any Error)?) -> Void)? = nilclassc)
Sends a message about an unhandled error. For more information, see PluginErrorDetails.
Parameters:
|
Object that describes the error. |
|
Callback method to call if an error occurs while sending the message. The |
reportError(_:message:onFailure:)
class func reportError(_ errorDetails: PluginErrorDetails?, message: String?, onFailure: ((_ error: (any Error)?) -> Void)? = nil)
Sends a custom error message. Errors are grouped using backtrace
. To change the grouping parameter, use -reportErrorWithIdentifier:message:details:onFailure:. For more information, see PluginErrorDetails.
Parameters:
|
Object with error details. |
|
Short error description. |
|
Callback method to call if an error occurs while sending the message. The |
reportError(:withIdentifier:message:details:onFailure)
class func reportError(withIdentifier identifier: String?, message: String?, details errorDetails: PluginErrorDetails?, onFailure: ((_ error: (any Error)?) -> Void)? = nil)
Sends an error message with a short description. Errors are grouped by the passed ID. To group them using backtrace
instead, use the -reportError:message:onFailure: method. For more information, see PluginErrorDetails.
Parameters:
|
ID used for grouping. |
|
Short error description. |
|
Object with error details. |
|
Callback method to call if an error occurs while sending the message. The |