com.yandex.metrica.plugins

Interface IPluginReporter

  1. Method Summary
  2. Method Detail
    1. reportUnhandledException
    2. reportError
    3. reportError


public interface IPluginReporter

IPluginReporter is an extension of IReporter.

Instance of object that implements IPluginReporter can be obtained via IReporter.getPluginExtension() method call.

For every reporter only one IPluginReporter instance is created. You can either query it each time you need it, or save the reference by yourself.

See Also:
IReporter.getPluginExtension()

Method Summary

All Methods
Instance Methods
Abstract Methods
Modifier and TypeMethod and Description
voidreportError(PluginErrorDetails errorDetails, java.lang.String message)
Reports error from plugin.
voidreportError(java.lang.String identifier, java.lang.String message, PluginErrorDetails errorDetails)
Reports error from plugin.
voidreportUnhandledException(PluginErrorDetails errorDetails)
Reports unhandled exception from plugin.

Method Detail

reportUnhandledException

void reportUnhandledException(@NonNull
                              PluginErrorDetails errorDetails)
Reports unhandled exception from plugin.
Parameters:
errorDetails - Object describing the exception.
See Also:
PluginErrorDetails

reportError

void reportError(@NonNull
                 PluginErrorDetails errorDetails,
                 @Nullable
                 java.lang.String message)
Reports error from plugin. Use this method to report an unexpected situation. If you use this method errors will be grouped by errorDetails stacktrace. If you want to influence the way errors are grouped use reportError(String, String, PluginErrorDetails)
Parameters:
errorDetails - Object describing the error. For the error to be sent, errorDetails must contain non empty stacktrace. Otherwise it will be ignored. If you can't provide stacktrace, use reportError(String, String, PluginErrorDetails) with filled identifier.
message - Short description or name of the error.
See Also:
PluginErrorDetails

reportError

void reportError(@NonNull
                 java.lang.String identifier,
                 @Nullable
                 java.lang.String message,
                 @Nullable
                 PluginErrorDetails errorDetails)
Reports error from plugin. Use this method to report an unexpected situation. This method should be used if you want to customize error grouping. If not use reportError(PluginErrorDetails, String)
Parameters:
identifier - An identifier used for grouping errors. Errors that have the same identifiers will belong in one group. Do not use dynamically formed strings or exception messages as identifiers to avoid having too many small crash groups.
message - Short description or name of the error.
errorDetails - Object describing the error.
See Also:
PluginErrorDetails