captureException static method

Future<SentryId> captureException(
  1. dynamic throwable, {
  2. dynamic stackTrace,
  3. Hint? hint,
  4. SentryMessage? message,
  5. ScopeCallback? withScope,
})

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

Implementation

static Future<SentryId> captureException(
  dynamic throwable, {
  dynamic stackTrace,
  Hint? hint,
  SentryMessage? message,
  ScopeCallback? withScope,
}) => _taskQueue.enqueue(
  () => _hub.captureException(
    throwable,
    stackTrace: stackTrace,
    hint: hint,
    message: message,
    withScope: withScope,
  ),
  SentryId.empty(),
  DataCategory.error,
);