addError method
void
addError(
- Object error,
- RumErrorSource source, {
- StackTrace? stackTrace,
- String? errorType,
- Map<
String, Object?> attributes = const {},
Notifies that the Exception or Error error
occurred in currently
presented View, with an origin of source
. You can optionally set
additional attributes
for this error, an errorType
and a
stackTrace
Implementation
void addError(
Object error,
RumErrorSource source, {
StackTrace? stackTrace,
String? errorType,
Map<String, Object?> attributes = const {},
}) {
wrap('rum.addError', logger, attributes, () {
return _platform.addError(error, source, stackTrace, errorType, {
DatadogPlatformAttributeKey.errorSourceType: 'flutter',
...attributes
});
});
}