1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-13 14:31:08 +01:00

Improve Exceptions (SMACK-426)

This commit is contained in:
Florian Schmaus 2014-03-17 21:06:45 +01:00
parent 9c8d7af3bf
commit c592b4f046
9 changed files with 103 additions and 57 deletions

View file

@ -25,6 +25,7 @@ import java.io.OutputStream;
import java.net.ConnectException;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.SmackException.FeatureNotSupportedException;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
@ -152,13 +153,10 @@ public class Socks5ByteStreamManagerTest {
fail("exception should be thrown");
}
catch (SmackException e) {
assertTrue(e.getMessage().contains("doesn't support SOCKS5 Bytestream"));
}
catch (IOException e) {
fail(e.getMessage());
}
catch (InterruptedException e) {
catch (FeatureNotSupportedException e) {
assertTrue(e.getFeature().equals("SOCKS5 Bytestream"));
assertTrue(e.getJid().equals(targetJID));
} catch(Exception e) {
fail(e.getMessage());
}