From 49c71f9f2d9da14ab4d8759023bb5c12b1fd1b17 Mon Sep 17 00:00:00 2001 From: Ryan Hirasaki Date: Wed, 16 Jun 2021 15:24:06 -0500 Subject: [PATCH] [wpilibj] Clarify robot quit message (#3364) Co-authored-by: David Vo --- .../java/edu/wpi/first/wpilibj/RobotBase.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotBase.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotBase.java index f3bac72d44..b798746aa7 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotBase.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotBase.java @@ -300,7 +300,12 @@ public abstract class RobotBase implements AutoCloseable { DriverStation.reportError( "Unhandled exception instantiating robot " + robotName + " " + throwable.toString(), elements); - DriverStation.reportWarning("Robots should not quit, but yours did!", false); + DriverStation.reportWarning( + "The robot program quit unexpectedly." + + " This is usually due to a code error.\n" + + " The above stacktrace can help determine where the error occurred.\n" + + " See https://wpilib.org/stacktrace for more information.\n", + false); DriverStation.reportError("Could not instantiate robot " + robotName + "!", false); return; } @@ -347,7 +352,12 @@ public abstract class RobotBase implements AutoCloseable { m_runMutex.unlock(); if (!suppressExitWarning) { // startCompetition never returns unless exception occurs.... - DriverStation.reportWarning("Robots should not quit, but yours did!", false); + DriverStation.reportWarning( + "The robot program quit unexpectedly." + + " This is usually due to a code error.\n" + + " The above stacktrace can help determine where the error occurred.\n" + + " See https://wpilib.org/stacktrace for more information.", + false); if (errorOnExit) { DriverStation.reportError( "The startCompetition() method (or methods called by it) should have " @@ -361,7 +371,7 @@ public abstract class RobotBase implements AutoCloseable { } /** - * Suppress the "Robots should not quit" message. + * Suppress the "The robot program quit unexpectedly." message. * * @param value True if exit warning should be suppressed. */