template<Err:: Flag valid = Err:: ErrOK>
ErrorHandler class
| Template parameters | |
|---|---|
| valid | valid error flags |
Contents
Performs error checking on C-style ESP operations.
Constructors, destructors, conversion operators
- ErrorHandler(string&& caller, const char* globalLabel = nullptr) explicit
Public functions
- auto runCheck() -> bool
-
template<typename... Args>auto operator()(esp_err_t espFuncArgs..., string label, Args... args) -> ErrorHandler<valid>&
Function documentation
template<Err:: Flag valid>
ErrorHandler<valid>:: ErrorHandler(string&& caller,
const char* globalLabel = nullptr) explicit
| Parameters | |
|---|---|
| caller | the calling function (for debugging) |
| globalLabel | a default label to use if a function doesn't have one |
Creates an instance this handler to perform ESP operations safely.
template<Err:: Flag valid>
template<typename... Args>
ErrorHandler<valid>& ErrorHandler<valid>:: operator()(esp_err_t espFuncArgs...,
string label,
Args... args)
| Template parameters | |
|---|---|
| Args | the ESP function args |
| Parameters | |
| espFunc | the ESP function |
| label | the function label (for debugging) |
| args | the ESP function argument values |
| Returns | this handler for call chaining |
Function call operator to pass an ESP function, it's name and any arguments.