1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 05:52:06 +01:00

Remove toString form XMPPException subclasses

and getMessage(), to use the implementations in Exception instead.
This commit is contained in:
Florian Schmaus 2015-02-16 14:51:37 +01:00
parent 1577fa1fca
commit b910d026cd

View file

@ -129,11 +129,6 @@ public abstract class XMPPException extends Exception {
}
}
@Override
public String toString() {
return getMessage();
}
public static void ifHasErrorThenThrow(Stanza packet) throws XMPPErrorException {
XMPPError xmppError = packet.getError();
if (xmppError != null) {
@ -157,7 +152,7 @@ public abstract class XMPPException extends Exception {
* @param streamError the root cause of the exception.
*/
public StreamErrorException(StreamError streamError) {
super();
super(streamError.toString());
this.streamError = streamError;
}
@ -171,14 +166,5 @@ public abstract class XMPPException extends Exception {
return streamError;
}
@Override
public String getMessage() {
return streamError.toString();
}
@Override
public String toString() {
return getMessage();
}
}
}