#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.
|
#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) |
|
|
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) |
|
◆ FRC_Assert
◆ FRC_AssertMessage
#define FRC_AssertMessage |
( |
|
condition, |
|
|
|
format, |
|
|
|
... |
|
) |
| |
Value: do { \
__FUNCTION__, \
} \
} while (0)
RuntimeError MakeError(int32_t status, const char *fileName, int lineNumber, const char *funcName, fmt::string_view format, Args &&... args)
Definition: Errors.h:105
auto format(wformat_string< T... > fmt, T &&... args) -> std::wstring
Definition: xchar.h:108
◆ FRC_CheckErrorStatus
#define FRC_CheckErrorStatus |
( |
|
status, |
|
|
|
format, |
|
|
|
... |
|
) |
| |
Value: do { \
}
else if ((status) > 0) {
\
} \
} while (0)
void 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).
Definition: Errors.h:78
Checks a status code and depending on its value, either throws a RuntimeError exception, calls ReportError, or does nothing (if no error).
- Parameters
-
[out] | status | error code |
[in] | format | error message format |
◆ FRC_MakeError
#define FRC_MakeError |
( |
|
status, |
|
|
|
format, |
|
|
|
... |
|
) |
| |
Value:
Makes a runtime error exception object.
This object should be thrown by the caller.
- Parameters
-
[out] | status | error code |
[in] | format | error message format |
- Returns
- runtime error object
◆ FRC_ReportError
#define FRC_ReportError |
( |
|
status, |
|
|
|
format, |
|
|
|
... |
|
) |
| |
Value:
Reports an error to the driver station (using HAL_SendError).
- Parameters
-
[out] | status | error code |
[in] | format | error message format |
◆ S [1/2]
#define S |
( |
|
label, |
|
|
|
offset, |
|
|
|
message |
|
) |
| inline constexpr int label = offset; |
◆ S [2/2]
#define S |
( |
|
label, |
|
|
|
offset, |
|
|
|
message |
|
) |
| inline constexpr int label = offset; |