diff --git a/wpilibjIntegrationTests/src/main/java/edu/wpi/first/wpilibj/test/AbstractComsSetup.java b/wpilibjIntegrationTests/src/main/java/edu/wpi/first/wpilibj/test/AbstractComsSetup.java index fd3b04b13b..1db2e5e5b0 100644 --- a/wpilibjIntegrationTests/src/main/java/edu/wpi/first/wpilibj/test/AbstractComsSetup.java +++ b/wpilibjIntegrationTests/src/main/java/edu/wpi/first/wpilibj/test/AbstractComsSetup.java @@ -46,16 +46,22 @@ public abstract class AbstractComsSetup { */ static { if (!initialized) { - // Set some implementations so that the static methods work properly - RobotBase.initializeHardwareConfiguration(); - HAL.observeUserProgramStarting(); - DriverStation.getInstance().getAlliance(); + try { + // Set some implementations so that the static methods work properly + RobotBase.initializeHardwareConfiguration(); + HAL.observeUserProgramStarting(); + DriverStation.getInstance().getAlliance(); - ds = new MockDS(); - ds.start(); + ds = new MockDS(); + ds.start(); - LiveWindow.setEnabled(false); - TestBench.out().println("Started coms"); + LiveWindow.setEnabled(false); + TestBench.out().println("Started coms"); + } catch (Exception ex) { + TestBench.out().println("Exception during AbstractComsSetup initialization: " + ex); + ex.printStackTrace(TestBench.out()); + throw ex; + } // Wait until the robot is enabled before starting the tests int enableCounter = 0;