mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[wpilibj] Clarify robot quit message (#3364)
Co-authored-by: David Vo <auscompgeek@users.noreply.github.com>
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user