Boboter
Loading...
Searching...
No Matches
error.cpp File Reference
#include "error.h"
#include "lib/logger/logger.h"

Functions

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.
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.

Detailed Description

Authors
MarioS271

Function Documentation

◆ 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
tagThe tag to use when logging
exprThe 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
tagThe tag to use when logging
exprThe expression to check