minor background reporting fix
This commit is contained in:
parent
63a789ebfb
commit
6cb5463b13
@ -150,7 +150,7 @@ class LocationManager {
|
||||
void updateDeviceLocationIsolate() {
|
||||
workManager.Workmanager.executeTask((backgroundTask, data) {
|
||||
print("[Background $backgroundTask] Started");
|
||||
final SentryClient sentryClient = SentryClient(dsn: "https://5c868e5ef26947e2b61b189e391ec31b@sentry.io/1836366");
|
||||
final SentryClient sentryBackgroundClient = SentryClient(dsn: "https://5c868e5ef26947e2b61b189e391ec31b@sentry.io/1836366");
|
||||
Geolocator geolocator = Geolocator();
|
||||
var battery = Battery();
|
||||
int batteryLevel = 100;
|
||||
@ -187,9 +187,8 @@ void updateDeviceLocationIsolate() {
|
||||
throw "Can't get device location. Location is null";
|
||||
}
|
||||
}).catchError((e) {
|
||||
sentryClient.captureException(
|
||||
exception: "Error tracking location",
|
||||
stackTrace: "${e.toString()}",
|
||||
sentryBackgroundClient.captureException(
|
||||
exception: "${e.toString()}"
|
||||
);
|
||||
print("[Background $backgroundTask] Error getting current location: ${e.toString()}");
|
||||
});
|
||||
|
Reference in New Issue
Block a user