Add more logs

This commit is contained in:
problematicconsumer
2023-08-23 00:06:51 +03:30
parent ff8fd230b3
commit 45095745a3
6 changed files with 21 additions and 5 deletions

View File

@@ -37,9 +37,12 @@ class ProfilesRepositoryImpl
@override
Stream<Either<ProfileFailure, Profile?>> watchActiveProfile() {
return profilesDao
.watchActiveProfile()
.handleExceptions(ProfileUnexpectedFailure.new);
return profilesDao.watchActiveProfile().handleExceptions(
(error, stackTrace) {
loggy.warning("error watching active profile", error, stackTrace);
return ProfileUnexpectedFailure(error, stackTrace);
},
);
}
@override

View File

@@ -17,6 +17,7 @@ class UpdateRepositoryImpl
TaskEither<UpdateFailure, InstalledVersionInfo> getCurrentVersion() {
return exceptionHandler(
() async {
loggy.debug("getting current app version");
final packageInfo = await PackageInfo.fromPlatform();
return right(
InstalledVersionInfo(
@@ -26,7 +27,10 @@ class UpdateRepositoryImpl
),
);
},
UpdateFailure.unexpected,
(error, stackTrace) {
loggy.warning("error getting current app version", error, stackTrace);
return UpdateFailure.unexpected(error, stackTrace);
},
);
}