Permalink
Browse files

Tidied Exceptions

  • Loading branch information...
1 parent e3997e7 commit 0f59c109b286cb5620ed0dd036b07ba36f35765e Ann Witbrock committed Apr 5, 2011
View
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -7,8 +6,7 @@
private static final String EXCHANGE_NAME = "logs";
- public static void main(String[] argv)
- throws java.io.IOException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -41,5 +39,5 @@ private static String joinStrings(String[] strings, String delimiter) {
}
return words.toString();
}
-
}
+
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -7,8 +6,7 @@
private static final String EXCHANGE_NAME = "direct_logs";
- public static void main(String[] argv)
- throws java.io.IOException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -50,3 +48,4 @@ private static String joinStrings(String[] strings, String delimiter, int startI
return words.toString();
}
}
+
@@ -6,8 +6,7 @@
private static final String EXCHANGE_NAME = "topic_logs";
- public static void main(String[] argv)
- throws Exception {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
View
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -8,7 +7,7 @@
private static final String TASK_QUEUE_NAME = "task_queue";
- public static void main(String[] argv) throws java.io.IOException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -43,4 +42,4 @@ private static String joinStrings(String[] strings, String delimiter) {
}
return words.toString();
}
-}
+}
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -8,9 +7,7 @@
private static final String EXCHANGE_NAME = "logs";
- public static void main(String[] argv)
- throws java.io.IOException,
- java.lang.InterruptedException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -34,3 +31,4 @@ public static void main(String[] argv)
}
}
}
+
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -8,9 +7,7 @@
private static final String EXCHANGE_NAME = "direct_logs";
- public static void main(String[] argv)
- throws java.io.IOException,
- java.lang.InterruptedException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -43,3 +40,4 @@ public static void main(String[] argv)
}
}
}
+
@@ -7,8 +7,7 @@
private static final String EXCHANGE_NAME = "topic_logs";
- public static void main(String[] argv)
- throws Exception {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
View
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -8,9 +7,7 @@
private final static String QUEUE_NAME = "hello";
- public static void main(String[] argv)
- throws java.io.IOException,
- java.lang.InterruptedException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -29,4 +26,4 @@ public static void main(String[] argv)
System.out.println(" [x] Received '" + message + "'");
}
}
-}
+}
View
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -7,8 +6,7 @@
private final static String QUEUE_NAME = "hello";
- public static void main(String[] argv)
- throws java.io.IOException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -23,4 +21,4 @@ public static void main(String[] argv)
channel.close();
connection.close();
}
-}
+}
View
@@ -1,4 +1,3 @@
-import java.io.IOException;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
@@ -8,9 +7,7 @@
private static final String TASK_QUEUE_NAME = "task_queue";
- public static void main(String[] argv)
- throws java.io.IOException,
- java.lang.InterruptedException {
+ public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
@@ -43,3 +40,4 @@ private static void doWork(String task) throws InterruptedException {
}
}
}
+

0 comments on commit 0f59c10

Please sign in to comment.