diff --git a/src/edu/nps/moves/dis7/utilities/stream/PduPlayer.java b/src/edu/nps/moves/dis7/utilities/stream/PduPlayer.java index 50c4b39ca84ba3031551a6991adc41a1f87155ae..1aa5a9a95e3686823d3a1cbd0e142382a25451a6 100644 --- a/src/edu/nps/moves/dis7/utilities/stream/PduPlayer.java +++ b/src/edu/nps/moves/dis7/utilities/stream/PduPlayer.java @@ -491,7 +491,7 @@ public class PduPlayer { /** Test execution for debugging * @param args command-line arguments (unused) */ - public static void main(String[] args) throws IOException // TODO fix exception handling + public static void main(String[] args) { String DEFAULT_OUTPUT_DIRECTORY = "pduLog"; /** Default multicast group address we send on. @@ -504,9 +504,16 @@ public class PduPlayer { int multicastPort = DEFAULT_MULTICAST_PORT; boolean sendToNet = true; - // create instance of class in this static block - PduPlayer pduPlayer = new PduPlayer(multicastAddress, multicastPort, Path.of(outputDirectory), sendToNet); - // thread automatically starts up when class is instantiated - pduPlayer.begin(); // default is self test through all logs in ancestor pduLog subdirectory + try + { + // create instance of class in this static block + PduPlayer pduPlayer = new PduPlayer(multicastAddress, multicastPort, Path.of(outputDirectory), sendToNet); + // thread automatically starts up when class is instantiated + pduPlayer.begin(); // default is self test through all logs in ancestor pduLog subdirectory + } + catch (IOException ioe) + { + System.out.println("PduPlayer exception in main(): " + ioe.getMessage()); + } } }