mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilibc] Remove ErrorBase (#3306)
Replace with new exception-based error reporting, consistent with Java. This also builds stacktraces into the reporting/exceptions.
This commit is contained in:
@@ -18,9 +18,9 @@
|
||||
|
||||
#include "WPILibVersion.h"
|
||||
#include "frc/DriverStation.h"
|
||||
#include "frc/Errors.h"
|
||||
#include "frc/RobotState.h"
|
||||
#include "frc/Utility.h"
|
||||
#include "frc/WPIErrors.h"
|
||||
#include "frc/livewindow/LiveWindow.h"
|
||||
#include "frc/smartdashboard/SmartDashboard.h"
|
||||
|
||||
@@ -54,10 +54,10 @@ class WPILibCameraServerShared : public frc::CameraServerShared {
|
||||
HAL_Report(HALUsageReporting::kResourceType_PCVideoServer, id);
|
||||
}
|
||||
void SetCameraServerError(const wpi::Twine& error) override {
|
||||
wpi_setGlobalWPIErrorWithContext(CameraServerError, error);
|
||||
FRC_ReportError(err::CameraServerError, error);
|
||||
}
|
||||
void SetVisionRunnerError(const wpi::Twine& error) override {
|
||||
wpi_setGlobalErrorWithContext(-1, error);
|
||||
FRC_ReportError(-1, error);
|
||||
}
|
||||
void ReportDriverStationError(const wpi::Twine& error) override {
|
||||
DriverStation::ReportError(error);
|
||||
|
||||
Reference in New Issue
Block a user