gpt4 book ai didi

flutter - Sentry 不会在 Flutter 内部报告错误

转载 作者:行者123 更新时间:2023-12-04 13:36:18 25 4
gpt4 key购买 nike

我的哨兵设置是这样的:

void main() => runZonedGuarded(() {
runApp(MyApp());
}, (Object error, StackTrace stackTrace) {
reportError(error, stackTrace);
});

及相关功能
final SentryClient sentry = new SentryClient(dsn: '<my-dsn>');


Future<void> reportError(dynamic error, dynamic stackTrace) async {
sentry.captureException(
exception: error,
stackTrace: stackTrace,
);
}

我加了 throw Exception("my-error")在小部件的构建方法中,我看不到 Sentry Web 控制台上显示的错误。

我创建了一个文件来抛出异常和哨兵捕获,我确实看到哨兵报告了错误。
runZonedGuarded肯定有问题.

最佳答案

如果您使用的是免费版本并且没有超过每月配额,请检查您的哨兵仪表板。如果是这种情况,您将不会收到任何事件。

关于flutter - Sentry 不会在 Flutter 内部报告错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61742852/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com