mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 08:12:05 +01:00
Cleanup SASLErrorException
Reuse the constructor and append only the SASLError String to the Exceptions message (previously the full SASLError stanza was printed).
This commit is contained in:
parent
0c29fdb769
commit
5832236578
1 changed files with 3 additions and 6 deletions
|
@ -34,14 +34,11 @@ public class SASLErrorException extends XMPPException {
|
||||||
private final Map<String,String> texts;
|
private final Map<String,String> texts;
|
||||||
|
|
||||||
public SASLErrorException(String mechanism, SASLFailure saslFailure) {
|
public SASLErrorException(String mechanism, SASLFailure saslFailure) {
|
||||||
super("SASLError using " + mechanism + ": " + saslFailure);
|
this(mechanism, saslFailure, new HashMap<String, String>());
|
||||||
this.mechanism = mechanism;
|
|
||||||
this.saslFailure = saslFailure;
|
|
||||||
this.texts = new HashMap<String, String>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SASLErrorException(String mechanism, SASLFailure saslFailure, Map<String,String> texts) {
|
public SASLErrorException(String mechanism, SASLFailure saslFailure, Map<String,String> texts) {
|
||||||
super("SASLError using " + mechanism + ": " + saslFailure);
|
super("SASLError using " + mechanism + ": " + saslFailure.getSASLErrorString());
|
||||||
this.mechanism = mechanism;
|
this.mechanism = mechanism;
|
||||||
this.saslFailure = saslFailure;
|
this.saslFailure = saslFailure;
|
||||||
this.texts = texts;
|
this.texts = texts;
|
||||||
|
|
Loading…
Reference in a new issue