mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 10:17:16 +08:00
Log GitPush/Pull fails as errors
Instead of debug
This commit is contained in:
@ -173,8 +173,8 @@ class GitNoteRepository {
|
|||||||
authorEmail: Settings.instance.gitAuthorEmail,
|
authorEmail: Settings.instance.gitAuthorEmail,
|
||||||
authorName: Settings.instance.gitAuthor,
|
authorName: Settings.instance.gitAuthor,
|
||||||
);
|
);
|
||||||
} on GitException catch (ex) {
|
} on GitException catch (ex, stackTrace) {
|
||||||
Log.d(ex.toString());
|
Log.e("GitPull Failed", ex: ex, stacktrace: stackTrace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,12 +189,12 @@ class GitNoteRepository {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await _gitRepo.push();
|
await _gitRepo.push();
|
||||||
} on GitException catch (ex) {
|
} on GitException catch (ex, stackTrace) {
|
||||||
if (ex.cause == 'cannot push non-fastforwardable reference') {
|
if (ex.cause == 'cannot push non-fastforwardable reference') {
|
||||||
await pull();
|
await pull();
|
||||||
return push();
|
return push();
|
||||||
}
|
}
|
||||||
Log.d(ex.toString());
|
Log.e("GitPush Failed", ex: ex, stacktrace: stackTrace);
|
||||||
rethrow;
|
rethrow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user