Improve "Invalid affiliation" exception message

This commit is contained in:
Florian Schmaus 2016-10-03 13:12:05 +02:00
parent 810e7c8b78
commit 1f66f301ba
1 changed files with 4 additions and 1 deletions

View File

@ -53,7 +53,10 @@ public class AffiliationProvider extends ExtensionElementProvider<Affiliation> {
affiliation = new Affiliation(jid, affiliationType, namespace);
}
else {
throw new SmackException("Invalid affililation");
throw new SmackException("Invalid affililation. Either one of 'node' or 'jid' must be set"
+ ". Node: " + node
+ ". Jid: " + jid
+ '.');
}
return affiliation;
}