mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 22:32:06 +01:00
Remove toString form XMPPException subclasses
and getMessage(), to use the implementations in Exception instead.
This commit is contained in:
parent
1577fa1fca
commit
b910d026cd
1 changed files with 1 additions and 15 deletions
|
@ -129,11 +129,6 @@ public abstract class XMPPException extends Exception {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return getMessage();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void ifHasErrorThenThrow(Stanza packet) throws XMPPErrorException {
|
public static void ifHasErrorThenThrow(Stanza packet) throws XMPPErrorException {
|
||||||
XMPPError xmppError = packet.getError();
|
XMPPError xmppError = packet.getError();
|
||||||
if (xmppError != null) {
|
if (xmppError != null) {
|
||||||
|
@ -157,7 +152,7 @@ public abstract class XMPPException extends Exception {
|
||||||
* @param streamError the root cause of the exception.
|
* @param streamError the root cause of the exception.
|
||||||
*/
|
*/
|
||||||
public StreamErrorException(StreamError streamError) {
|
public StreamErrorException(StreamError streamError) {
|
||||||
super();
|
super(streamError.toString());
|
||||||
this.streamError = streamError;
|
this.streamError = streamError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,14 +166,5 @@ public abstract class XMPPException extends Exception {
|
||||||
return streamError;
|
return streamError;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getMessage() {
|
|
||||||
return streamError.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return getMessage();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue