mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 02:05:29 +00:00
Add extra context information to sentry error reports
- Should help to track down bugs where stacktrace is missing information - Adds some more error catching, too
This commit is contained in:
@ -39,7 +39,15 @@ Future<void> main() async {
|
||||
FlutterError.onError = (FlutterErrorDetails details) async {
|
||||
|
||||
// Ensure that the error gets reported to sentry!
|
||||
await sentryReportError(details.exception, details.stack);
|
||||
await sentryReportError(
|
||||
"FlutterError.onError",
|
||||
details.exception, details.stack,
|
||||
context: {
|
||||
"context": details.context.toString(),
|
||||
"summary": details.summary.toString(),
|
||||
"library": details.library ?? "null",
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
runApp(
|
||||
@ -47,7 +55,7 @@ Future<void> main() async {
|
||||
);
|
||||
|
||||
}, (Object error, StackTrace stackTrace) async {
|
||||
sentryReportError(error, stackTrace);
|
||||
sentryReportError("main.runZonedGuarded", error, stackTrace);
|
||||
});
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user