Timer duration parsing error report improvement

This commit is contained in:
Yegor Vialov 2020-05-08 12:47:43 +00:00
parent de713024f6
commit 870bc25dd9

View File

@ -26,11 +26,11 @@ class TimerEntity extends Entity {
seconds: int.tryParse(durationList[2]) ?? 0 seconds: int.tryParse(durationList[2]) ?? 0
); );
} else { } else {
Logger.e("Strange $entityId duration format: $durationSource"); Logger.e("Strange timer duration format: $durationSource");
duration = Duration(seconds: 0); duration = Duration(seconds: 0);
} }
} catch (e, stacktrace) { } catch (e, stacktrace) {
Logger.e("Error parsing duration for $entityId: $e", stacktrace: stacktrace); Logger.e("Error parsing timer duration \'$durationSource\': $e", stacktrace: stacktrace);
duration = Duration(seconds: 0); duration = Duration(seconds: 0);
} }
} else { } else {