report static method

Future<void> report(
  1. Exception exception, {
  2. StackTrace? trace,
})

Reports the exception to Sentry, if enabled.

Implementation

static Future<void> report(Exception exception, {StackTrace? trace}) async {
  if (!kDebugMode && Config.sentryDsn.isNotEmpty) {
    try {
      await Sentry.captureException(exception, stackTrace: trace);
    } catch (_) {
      // No-op.
    }
  }
}