addErrorInfo method

void addErrorInfo(
  1. String message,
  2. RumErrorSource source, {
  3. StackTrace? stackTrace,
  4. String? errorType,
  5. Map<String, Object?> attributes = const {},
})

Notifies that an error occurred in currently presented View, with the supplied message and with an origin of source. You can optionally supply a stackTrace, errorType, and send additional attributes for this error

Implementation

void addErrorInfo(
  String message,
  RumErrorSource source, {
  StackTrace? stackTrace,
  String? errorType,
  Map<String, Object?> attributes = const {},
}) {
  wrap('rum.addErrorInfo', logger, attributes, () {
    return _platform.addErrorInfo(message, source, stackTrace, errorType, {
      DatadogPlatformAttributeKey.errorSourceType: 'flutter',
      ...attributes
    });
  });
}