[wpilibj] Call abort() on Rio on caught Java exception (#6420)

On Rio, we simply want to restart the robot program as quickly as possible,
and don't want to risk a hang somewhere that will keep that from happening.

The main downside of this is it won't wait for threads to finish (e.g. data logs won't get a final flush).
This commit is contained in:
Peter Johnson
2024-03-09 09:55:49 -08:00
committed by GitHub
parent ccb4cbed63
commit 18e57f7872
3 changed files with 23 additions and 0 deletions

View File

@@ -75,6 +75,9 @@ public final class HAL extends JNIWrapper {
*/
public static native void exitMain();
/** Terminates the executable (at the native level). Does nothing in simulation. */
public static native void terminate();
private static native void simPeriodicBeforeNative();
private static final List<Runnable> s_simPeriodicBefore = new ArrayList<>();