fix: catch unhandled exception
@@ -166,7 +166,11 @@ public class PluginCaller {
public Serializable executeRPC(String methodName, Collection<Serializable> args, Type returnType)
throws IOException, InterruptedException, PluginException {
+ try {
connection = factory.newConnection();
+ } catch (TimeoutException e) {
+ throw new PluginException("Could not open a connection after timeout.");
+ }
Channel channel = connection.createChannel();
String replyQueueName = channel.queueDeclare().getQueue();
String exchange = "openbaton-exchange";
