WPILibC++ 2024.1.1-beta-4
|
#include <stdint.h>
#include <memory>
#include <stdexcept>
#include <string>
#include <fmt/format.h>
#include "frc/WPIErrors.mac"
#include "frc/WPIWarnings.mac"
Go to the source code of this file.
Classes | |
class | frc::RuntimeError |
Runtime error exception. More... | |
Namespaces | |
namespace | frc |
namespace | frc::err |
namespace | frc::warn |
Macros | |
#define | S(label, offset, message) inline constexpr int label = offset; |
#define | S(label, offset, message) inline constexpr int label = offset; |
#define | FRC_ReportError(status, format, ...) |
Reports an error to the driver station (using HAL_SendError). More... | |
#define | FRC_MakeError(status, format, ...) |
Makes a runtime error exception object. More... | |
#define | FRC_CheckErrorStatus(status, format, ...) |
Checks a status code and depending on its value, either throws a RuntimeError exception, calls ReportError, or does nothing (if no error). More... | |
#define | FRC_AssertMessage(condition, format, ...) |
#define | FRC_Assert(condition) FRC_AssertMessage(condition, #condition) |
Functions | |
const char * | frc::GetErrorMessage (int32_t *code) |
Gets error message string for an error code. More... | |
void | frc::ReportErrorV (int32_t status, const char *fileName, int lineNumber, const char *funcName, fmt::string_view format, fmt::format_args args) |
Reports an error to the driver station (using HAL_SendError). More... | |
template<typename... Args> | |
void | frc::ReportError (int32_t status, const char *fileName, int lineNumber, const char *funcName, fmt::string_view format, Args &&... args) |
Reports an error to the driver station (using HAL_SendError). More... | |
RuntimeError | frc::MakeErrorV (int32_t status, const char *fileName, int lineNumber, const char *funcName, fmt::string_view format, fmt::format_args args) |
Makes a runtime error exception object. More... | |
template<typename... Args> | |
RuntimeError | frc::MakeError (int32_t status, const char *fileName, int lineNumber, const char *funcName, fmt::string_view format, Args &&... args) |
#define FRC_Assert | ( | condition | ) | FRC_AssertMessage(condition, #condition) |
#define FRC_AssertMessage | ( | condition, | |
format, | |||
... | |||
) |
#define FRC_CheckErrorStatus | ( | status, | |
format, | |||
... | |||
) |
Checks a status code and depending on its value, either throws a RuntimeError exception, calls ReportError, or does nothing (if no error).
[out] | status | error code |
[in] | format | error message format |
#define FRC_MakeError | ( | status, | |
format, | |||
... | |||
) |
Makes a runtime error exception object.
This object should be thrown by the caller.
[out] | status | error code |
[in] | format | error message format |
#define FRC_ReportError | ( | status, | |
format, | |||
... | |||
) |
Reports an error to the driver station (using HAL_SendError).
[out] | status | error code |
[in] | format | error message format |
#define S | ( | label, | |
offset, | |||
message | |||
) | inline constexpr int label = offset; |
#define S | ( | label, | |
offset, | |||
message | |||
) | inline constexpr int label = offset; |