Exceptions

object Exceptions

A collection of BunyipsLib global utilities for handling and managing user exceptions.

Provides automatic swallowing of non-critical exceptions while logging to Logcat and the Driver Station, used to "safeguard" the behaviour of user-space code via runUserMethod and handle.

The EmergencyStop exception can be thrown to bypass the capturing nature of this class.

Author

Lucas Bubner, 2025

Since

1.0.0-pre

Types

Link copied to clipboard

Custom exception to be thrown when BunyipsLib should end the OpMode following a critical error. This ensures the Exceptions handler will be called but also allows the OpMode to be ended immediately.

Properties

Link copied to clipboard

Maximum number of characters to display in the stacktrace on the Driver Station.

Link copied to clipboard

Exceptions thrown since the last reset of this set.

Functions

Link copied to clipboard

Get the calling user code function of the current context by looking at the stacktrace until it leaves BunyipsLib.

Link copied to clipboard

Handle an exception, logging it to the Driver Station and Logcat.

Link copied to clipboard

Handle and run a single user-controlled method by wrapping the execution with an Exceptions.handle().