shouldLogException: Handle all exception types

Fixes APP-SB
This commit is contained in:
Vishesh Handa
2021-01-18 23:47:03 +01:00
parent 1a13173386
commit 9946993364

View File

@ -284,8 +284,11 @@ const ignoredMessages = [
"failed getting response",
];
bool shouldLogGitException(GitException ex) {
var msg = ex.cause.toLowerCase();
bool shouldLogGitException(Exception ex) {
if (ex is! GitException) {
return false;
}
var msg = (ex as GitException).cause.toLowerCase();
for (var i = 0; i < ignoredMessages.length; i++) {
if (msg.contains(ignoredMessages[i])) {
return false;