capture method
Future<ReportEvent>
capture(
- BaseException exception, {
- Map<
String, dynamic> additionalContext = const {}, - bool manual = false,
- bool handled = true,
Convenience method to capture and report an exception directly.
Throws StateError when the client is not initialized and propagates pipeline/outbox failures; use captureSafely when reporting must not affect the surrounding flow.
Implementation
Future<ReportEvent> capture(
BaseException exception, {
Map<String, dynamic> additionalContext = const {},
bool manual = false,
bool handled = true,
}) async {
final event = await createEvent(
exception,
additionalContext: additionalContext,
manual: manual,
handled: handled,
);
await report(event);
return event;
}