From b3014d41869210caf6e39528c9025a1d1b44455c Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Wed, 10 Jun 2020 13:28:35 +0200 Subject: [PATCH] Log GitPush/Pull fails as errors Instead of debug --- lib/core/git_repo.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/core/git_repo.dart b/lib/core/git_repo.dart index 0a2d8765..2ca860bc 100644 --- a/lib/core/git_repo.dart +++ b/lib/core/git_repo.dart @@ -173,8 +173,8 @@ class GitNoteRepository { authorEmail: Settings.instance.gitAuthorEmail, authorName: Settings.instance.gitAuthor, ); - } on GitException catch (ex) { - Log.d(ex.toString()); + } on GitException catch (ex, stackTrace) { + Log.e("GitPull Failed", ex: ex, stacktrace: stackTrace); } } @@ -189,12 +189,12 @@ class GitNoteRepository { try { await _gitRepo.push(); - } on GitException catch (ex) { + } on GitException catch (ex, stackTrace) { if (ex.cause == 'cannot push non-fastforwardable reference') { await pull(); return push(); } - Log.d(ex.toString()); + Log.e("GitPush Failed", ex: ex, stacktrace: stackTrace); rethrow; } }