Error handling improvements

This commit is contained in:
Yegor Vialov
2020-05-01 16:24:13 +00:00
parent 7a0ce93cfd
commit 46ca1948e2
8 changed files with 24 additions and 25 deletions

View File

@ -65,8 +65,8 @@ class CardData {
}
return CardData(rawData);
}
} catch (error) {
Logger.e('Error parsing card: $error');
} catch (error, stacktrace) {
Logger.e('Parsing ${rawData['type']} card: $error', stacktrace: stacktrace);
return ErrorCardData(rawData);
}
}
@ -148,9 +148,8 @@ class CardData {
break;
}
}
} catch (e) {
Logger.e('Error filtering ${entityWrapper.entity.entityId} by $allowedState');
Logger.e('$e');
} catch (e, stacktrace) {
Logger.e('Error filtering ${entityWrapper.entity.entityId} by $allowedState: $e', stacktrace: stacktrace);
}
}
}