reportError static method

Future<void> reportError(
  1. dynamic error,
  2. dynamic stackTrace, {
  3. bool toast = true,
})

手动上报日志

Implementation

static Future<void> reportError(
  dynamic error,
  dynamic stackTrace, {
  bool toast = true,
}) async {
  // 添加错误标签
  Sentry.addBreadcrumb(
    Breadcrumb(
      message: 'Unknown Error',
      category: SentryLoggerCategory.unknown,
      data: {
        'toast': toast,
      },
    ),
  );
  _baseReport(error, stackTrace);
}