#include <source_location>
#include <esp_err.h>
Go to the source code of this file.
|
| #define | ERROR_CHECK(expr) |
| | Checks if the given expression failed and aborts if so.
|
| #define | WARN_CHECK(expr) |
| | Checks if the given expression failed and warns if so.
|
|
| void | error_check_callback (const char *tag, esp_err_t expr, std::source_location loc=std::source_location::current()) |
| | Checks if the given expression failed and aborts if so.
|
| void | warn_check_callback (const char *tag, esp_err_t expr, std::source_location loc=std::source_location::current()) |
| | Checks if the given expression failed and warns if so.
|
- Authors
- MarioS271
- Copyright
- MIT License
◆ ERROR_CHECK
| #define ERROR_CHECK |
( |
| expr | ) |
|
Value:
void error_check_callback(const char *tag, const esp_err_t expr, const std::source_location loc)
Checks if the given expression failed and aborts if so.
Definition error.cpp:11
Checks if the given expression failed and aborts if so.
- Note
- Wrapper for
error_check_callback
- Attention
- This macro requires
TAG to be defined in the scope where it is used. If it isn't, please directly use error_check_callback
- Parameters
-
| expr | The expression to check |
◆ WARN_CHECK
| #define WARN_CHECK |
( |
| expr | ) |
|
Value:
void warn_check_callback(const char *tag, const esp_err_t expr, const std::source_location loc)
Checks if the given expression failed and warns if so.
Definition error.cpp:26
Checks if the given expression failed and warns if so.
- Note
- Wrapper for
warn_check_callback
- Attention
- This macro requires
TAG to be defined in the scope where it is used. If it isn't, please directly use warn_check_callback
- Parameters
-
| expr | The expression to check |
◆ error_check_callback()
| void error_check_callback |
( |
const char * | tag, |
|
|
esp_err_t | expr, |
|
|
std::source_location | loc = std::source_location::current() ) |
Checks if the given expression failed and aborts if so.
- Parameters
-
| tag | The tag to use when logging |
| expr | The expression to check |
◆ warn_check_callback()
| void warn_check_callback |
( |
const char * | tag, |
|
|
esp_err_t | expr, |
|
|
std::source_location | loc = std::source_location::current() ) |
Checks if the given expression failed and warns if so.
- Parameters
-
| tag | The tag to use when logging |
| expr | The expression to check |