[wpilibc] Add FRC_ReportWarning (#6681)

This commit is contained in:
Jade
2024-07-28 11:20:08 +08:00
committed by GitHub
parent aba82e6a6c
commit 5dcaa6d671
7 changed files with 24 additions and 15 deletions

View File

@@ -142,6 +142,17 @@ namespace warn {
} \
} while (0)
/**
* Reports a warning to the driver station (using HAL_SendError).
*
* @param[in] format error message format
*/
#define FRC_ReportWarning(format, ...) \
do { \
::frc::ReportError(warn::Warning, __FILE__, __LINE__, __FUNCTION__, \
FMT_STRING(format) __VA_OPT__(, ) __VA_ARGS__); \
} while (0)
/**
* Makes a runtime error exception object. This object should be thrown
* by the caller.