Skip to content

Commit 8e02119

Browse files
author
Steve Powell
committed
Remove JavaDoc warning, and put "DefaultExceptionHandler:" on logged message.
1 parent 54c1342 commit 8e02119

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/com/rabbitmq/client/impl/DefaultExceptionHandler.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
import com.rabbitmq.client.Connection;
2525
import com.rabbitmq.client.Consumer;
2626

27+
/**
28+
* Default implementation of {@link ExceptionHandler} used by {@link AMQConnection}.
29+
*/
2730
public class DefaultExceptionHandler implements ExceptionHandler {
2831
public void handleUnexpectedConnectionDriverException(Connection conn, Throwable exception) {
2932
// TODO: Log this somewhere, just in case we have a bug like
@@ -58,23 +61,26 @@ public void handleConsumerException(Channel channel, Throwable exception,
5861

5962
protected void handleChannelKiller(Channel channel, Throwable exception, String what) {
6063
// TODO: log the exception
61-
System.err.println(what + " threw an exception for channel " + channel + ":");
64+
System.err.println("DefaultExceptionHandler: " + what + " threw an exception for channel "
65+
+ channel + ":");
6266
exception.printStackTrace();
6367
try {
6468
channel.close();
6569
} catch (AlreadyClosedException ace) {
66-
//noop
70+
// noop
6771
} catch (IOException ioe) {
6872
// TODO: log the failure
69-
System.err.println("Failure during close of channel " + channel + " after " + exception + ":");
73+
System.err.println("Failure during close of channel " + channel + " after " + exception
74+
+ ":");
7075
ioe.printStackTrace();
7176
AMQConnection conn = (AMQConnection) channel.getConnection();
7277
try {
7378
conn.close(AMQP.INTERNAL_ERROR, "Internal error closing channel for " + what,
7479
false, ioe);
7580
} catch (IOException ioeH) {
7681
// TODO: log the failure
77-
System.err.println("Failure during close of connection " + conn + " after " + ioe + ":");
82+
System.err.println("Failure during close of connection " + conn + " after " + ioe
83+
+ ":");
7884
ioeH.printStackTrace();
7985
}
8086
}

0 commit comments

Comments
 (0)