mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01: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:
parent
0f83346d65
commit
b303da4e62
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user