captureException method

Future<SentryId> captureException(
  1. dynamic throwable, {
  2. dynamic stackTrace,
  3. Scope? scope,
  4. Hint? hint,
})

Reports the throwable and optionally its stackTrace to Sentry.io.

Implementation

Future<SentryId> captureException(
  dynamic throwable, {
  dynamic stackTrace,
  Scope? scope,
  Hint? hint,
}) {
  final event = SentryEvent(
    throwable: throwable,
    timestamp: _options.clock(),
  );

  return captureEvent(
    event,
    stackTrace: stackTrace,
    scope: scope,
    hint: hint,
  );
}