Merge branch '1483-crash-logging' into 'master'

Log the role we find when failing to parse creator session

See merge request briar/briar!1225
This commit is contained in:
akwizgran
2020-02-12 17:26:32 +00:00

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),