mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +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:
parent
e47d88a4bb
commit
c90a849a5a
5 changed files with 69 additions and 13 deletions
|
|
@ -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);
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue