Boboter
Loading...
Searching...
No Matches
error.h
Go to the documentation of this file.
1
7
8#pragma once
9
10#include <source_location>
11#include <esp_err.h>
12
19void error_check_callback(const char *tag,
20 esp_err_t expr,
21 std::source_location loc = std::source_location::current());
22
30#define ERROR_CHECK(expr) error_check_callback(TAG, expr)
31
32
33
34
41void warn_check_callback(const char* tag,
42 esp_err_t expr,
43 std::source_location loc = std::source_location::current());
44
52#define WARN_CHECK(expr) warn_check_callback(TAG, expr)
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.
Definition error.cpp:11
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.
Definition error.cpp:26