Package io.appmetrica.analytics.plugins
Class PluginErrorDetails.Builder
java.lang.Object
io.appmetrica.analytics.plugins.PluginErrorDetails.Builder
- Enclosing class:
- PluginErrorDetails
Builder for
PluginErrorDetails
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates an instance ofPluginErrorDetails
.withExceptionClass
(String value) Sets exception class.withMessage
(String value) Sets message.withPlatform
(String value) Sets platform.withPluginEnvironment
(Map<String, String> value) Sets plugin environment: arbitrary map containing any additional information about the plugin.withStacktrace
(List<StackTraceItem> value) Sets stacktrace.withVirtualMachineVersion
(String value) Sets virtual machine version.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withExceptionClass
Sets exception class.- Parameters:
value
- name of the class/interface/symbol (depending on the plugin you are using) of the error.- Returns:
- the same
PluginErrorDetails.Builder
object.
-
withMessage
Sets message.- Parameters:
value
- error message briefly describing the error.- Returns:
- the same
PluginErrorDetails.Builder
object.
-
withStacktrace
Sets stacktrace.- Parameters:
value
- error stacktrace.- Returns:
- the same
PluginErrorDetails.Builder
object. - See Also:
-
withPlatform
Sets platform. Use constants defined inPluginErrorDetails.Platform
for popular plugins or a custom string for a plugin that does not have a corresponding constant.- Parameters:
value
- name of the plugin in which the error occurred.- Returns:
- the same
PluginErrorDetails.Builder
object.
-
withVirtualMachineVersion
Sets virtual machine version. Use this method to specify the version of plugin you are using (e. g. Unity version, Flutter version, etc.).- Parameters:
value
- version.- Returns:
- the same
PluginErrorDetails.Builder
object.
-
withPluginEnvironment
@NonNull public PluginErrorDetails.Builder withPluginEnvironment(@Nullable Map<String, String> value) Sets plugin environment: arbitrary map containing any additional information about the plugin.
This environment is not the same asAppMetricaConfig.errorEnvironment
. The latter is applied to all following errors and crashes while the former is only applied to this particular error.- Parameters:
value
- plugin environment- Returns:
- the same
PluginErrorDetails.Builder
object.
-
build
Creates an instance ofPluginErrorDetails
.- Returns:
PluginErrorDetails
object.
-