1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 06:12:05 +01:00

Make SmackException abstract

This commit is contained in:
Florian Schmaus 2019-02-10 21:53:31 +01:00
parent 7e76712c46
commit 394f3d133a
3 changed files with 8 additions and 8 deletions

View file

@ -29,12 +29,12 @@ import org.jxmpp.jid.Jid;
*
* @author Florian Schmaus
*/
public class SmackException extends Exception {
public abstract class SmackException extends Exception {
/**
*
*/
private static final long serialVersionUID = 1844674365368214457L;
private static final long serialVersionUID = 1844674365368214458L;
/**
* Creates a new SmackException with the Throwable that was the root cause of the exception.
@ -49,7 +49,7 @@ public class SmackException extends Exception {
super(message);
}
public SmackException(String message, Throwable wrappedThrowable) {
protected SmackException(String message, Throwable wrappedThrowable) {
super(message, wrappedThrowable);
}

View file

@ -198,10 +198,10 @@ public class IncomingFileTransfer extends FileTransfer {
if (cause instanceof SmackException) {
throw (SmackException) cause;
}
throw new SmackException("Error in execution", e);
throw new SmackException.SmackWrappedException("Error in execution", e);
}
catch (TimeoutException e) {
throw new SmackException("Request timed out", e);
throw new SmackException.SmackWrappedException("Request timed out", e);
}
finally {
streamNegotiatorTask.cancel(true);

View file

@ -56,10 +56,10 @@ public class Socks5TransferNegotiator extends StreamNegotiator {
return this.manager.establishSession(target, streamID).getOutputStream();
}
catch (IOException e) {
throw new SmackException("error establishing SOCKS5 Bytestream", e);
throw new SmackException.SmackWrappedException("error establishing SOCKS5 Bytestream", e);
}
catch (InterruptedException e) {
throw new SmackException("error establishing SOCKS5 Bytestream", e);
throw new SmackException.SmackWrappedException("error establishing SOCKS5 Bytestream", e);
}
}
@ -109,7 +109,7 @@ public class Socks5TransferNegotiator extends StreamNegotiator {
return stream;
}
catch (IOException e) {
throw new SmackException("Error establishing input stream", e);
throw new SmackException.SmackWrappedException("Error establishing input stream", e);
}
}