Logic_library
Library for Logic board by RoboticsBrno.
Loading...
Searching...
No Matches
Macros | Enumerations | Functions | Variables
Error.hpp File Reference
#include <array>
#include <esp_debug_helpers.h>
#include <esp_log.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <string>

Go to the source code of this file.

Macros

#define ENABLE_CZECH_ERRORS   false
 

Enumerations

enum  ErrorCodes { NoError = 0 , VariableOverflow = 1 , VariableUnderflow }
 

Functions

void sanityCheck (bool expression, const char *tag, const char *errorMessage, unsigned stackTraceDepth=10)
 
void sanityCheck (bool expression, const char *tag, ErrorCodes errorCode, unsigned stackTraceDepth=10)
 
void checkRange (int value, int min, int max, const char *tag, unsigned stackTraceDepth=10)
 

Variables

static const std::string errors []
 
static const std::string errorsCs []
 

Macro Definition Documentation

◆ ENABLE_CZECH_ERRORS

#define ENABLE_CZECH_ERRORS   false

Enumeration Type Documentation

◆ ErrorCodes

enum ErrorCodes
Enumerator
NoError 
VariableOverflow 
VariableUnderflow 

Function Documentation

◆ checkRange()

void checkRange ( int  value,
int  min,
int  max,
const char *  tag,
unsigned  stackTraceDepth = 10 
)
inline

◆ sanityCheck() [1/2]

void sanityCheck ( bool  expression,
const char *  tag,
const char *  errorMessage,
unsigned  stackTraceDepth = 10 
)
inline

◆ sanityCheck() [2/2]

void sanityCheck ( bool  expression,
const char *  tag,
ErrorCodes  errorCode,
unsigned  stackTraceDepth = 10 
)
inline

Variable Documentation

◆ errors

const std::string errors[]
static
Initial value:
= {
"No error",
"Variable overflow",
"Variable underflow",
}

◆ errorsCs

const std::string errorsCs[]
static
Initial value:
= {
"Zadna chyba",
"Preteceni promenne",
"Podteceni promenne",
}