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