mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
Xiaomi: wrap parsing of activity data in try block
This will prevent uncaught exceptions that occur during the parsing of activity data from breaking up the activity fetching chain and causing the task to never get completed.
This commit is contained in:
@@ -117,9 +117,15 @@ public class XiaomiActivityFileFetcher {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!activityParser.parse(mHealthService.getSupport(), fileId, activityData)) {
|
||||
try {
|
||||
if (activityParser.parse(mHealthService.getSupport(), fileId, activityData)) {
|
||||
LOG.info("Successfully parsed {}", fileId);
|
||||
} else {
|
||||
LOG.warn("Failed to parse {}", fileId);
|
||||
}
|
||||
} catch (final Exception ex) {
|
||||
LOG.error("addChunk(): failed to parse activity: ", ex);
|
||||
}
|
||||
|
||||
triggerNextFetch();
|
||||
}
|
||||
|
Reference in New Issue
Block a user