mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-08-22 15:21:22 +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:
parent
0f83346d65
commit
b303da4e62
@ -117,8 +117,14 @@ public class XiaomiActivityFileFetcher {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!activityParser.parse(mHealthService.getSupport(), fileId, activityData)) {
|
try {
|
||||||
LOG.warn("Failed to parse {}", fileId);
|
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();
|
triggerNextFetch();
|
||||||
|
Loading…
Reference in New Issue
Block a user