captureException method
Future<void>
captureException({
- required Object error,
- StackTrace? stackTrace,
- Map<
String, Object> ? properties,
Implementation
@override
Future<void> captureException({
required Object error,
StackTrace? stackTrace,
Map<String, Object>? properties,
}) async {
try {
final exceptionData = DartExceptionProcessor.processException(
error: error,
stackTrace: stackTrace,
properties: properties,
inAppIncludes: _config?.errorTrackingConfig.inAppIncludes,
inAppExcludes: _config?.errorTrackingConfig.inAppExcludes,
inAppByDefault: _config?.errorTrackingConfig.inAppByDefault ?? true,
);
final normalizedData = PropertyNormalizer.normalize(
exceptionData.cast<String, Object>(),
);
return handleWebMethodCall(
MethodCall('captureException', {'properties': normalizedData}),
);
} on Exception catch (exception) {
printIfDebug('Exception in captureException: $exception');
}
}