aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny van Heumen <danny@dannyvanheumen.nl>2014-08-03 00:12:18 +0200
committerDanny van Heumen <danny@dannyvanheumen.nl>2014-08-03 00:19:50 +0200
commitaa2d405f638b009edb0a6ce7ccf68327e895ea7a (patch)
tree53b2c17cd0a04ecaa4aed74a89d4e47bcea1ca03
parent6bff68bbb8f0c3af435e24ff5665e5a8da50d566 (diff)
downloadjitsi-aa2d405f638b009edb0a6ce7ccf68327e895ea7a.zip
jitsi-aa2d405f638b009edb0a6ce7ccf68327e895ea7a.tar.gz
jitsi-aa2d405f638b009edb0a6ce7ccf68327e895ea7a.tar.bz2
Some exception handling on topic change.
-rw-r--r--src/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImpl.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImpl.java b/src/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImpl.java
index 4ee3528..0341c5f 100644
--- a/src/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/irc/ChatRoomIrcImpl.java
@@ -7,6 +7,7 @@
package net.java.sip.communicator.impl.protocol.irc;
import java.beans.*;
+import java.io.*;
import java.util.*;
import net.java.sip.communicator.service.protocol.*;
@@ -599,7 +600,21 @@ public class ChatRoomIrcImpl
public void setSubject(final String subject)
throws OperationFailedException
{
- parentProvider.getIrcStack().setSubject(this, subject);
+ try
+ {
+ parentProvider.getIrcStack().setSubject(this, subject);
+ }
+ catch (RuntimeException e)
+ {
+ if (e.getCause() instanceof IOException)
+ {
+ throw new OperationFailedException("Failed to change subject.",
+ OperationFailedException.NETWORK_FAILURE, e.getCause());
+ }
+
+ throw new OperationFailedException("Failed to change subject.",
+ OperationFailedException.GENERAL_ERROR, e);
+ }
}
/**