[core] log the role when failing to parse creator session

This commit is contained in:
Torsten Grote
2020-02-12 09:31:16 -03:00
parent 287be6aa3f
commit 748d249771

View File

@@ -71,7 +71,10 @@ class SessionParserImpl implements SessionParser {
@Override
public CreatorSession parseCreatorSession(GroupId contactGroupId,
BdfDictionary d) throws FormatException {
if (getRole(d) != CREATOR) throw new IllegalArgumentException();
if (getRole(d) != CREATOR) {
throw new IllegalArgumentException(
"Expected creator, but found " + getRole(d).name());
}
return new CreatorSession(contactGroupId, getPrivateGroupId(d),
getLastLocalMessageId(d), getLastRemoteMessageId(d),
getLocalTimestamp(d), getInviteTimestamp(d),