Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

[MINOR] Render handler exception to System.err instead of .out #334

Merged
merged 4 commits into from
Nov 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import tech.pegasys.pantheon.util.NetworkUtility;
import tech.pegasys.pantheon.util.bytes.BytesValue;

import java.io.IOException;
import java.net.BindException;
import java.net.InetSocketAddress;
import java.net.SocketException;
Expand Down Expand Up @@ -222,12 +223,16 @@ private void initialize(final DatagramSocket socket, final int tcpPort) {
}

/**
* This is the exception handler for uncontrolled exceptions ocurring in the packet handlers.
* For uncontrolled exceptions occurring in the packet handlers.
*
* @param throwable the exception that was raised
* @param exception the exception that was raised
*/
private void handleException(final Throwable throwable) {
System.out.println(throwable);
private void handleException(final Throwable exception) {
if (exception instanceof IOException) {
LOG.debug("Packet handler exception", exception);
} else {
LOG.error("Packet handler exception", exception);
}
}

/**
Expand Down