Arduino Filters master
Filter library for Arduino
Macros

Detailed Description

Macros for handling and reporting both fatal and non-fatal errors.

+ Collaboration diagram for Error:

Macros

#define ERROR(msg, errc)
 Print the error message and error code, and stop the execution if FATAL_ERRORS are enabled. More...
 
#define FATAL_ERROR(msg, errc)
 Print the error message and error code, and stop the execution. More...
 

Macro Definition Documentation

◆ ERROR

#define ERROR (   msg,
  errc 
)
Value:
do { \
DEBUGFN(msg << " (0x" << hex << uppercase << errc << dec \
<< nouppercase << ')'); \
} while (0)
Print & hex(Print &printer)
Definition: PrintStream.cpp:62
Print & nouppercase(Print &printer)
Definition: PrintStream.cpp:40
Print & uppercase(Print &printer)
Definition: PrintStream.cpp:35
Print & dec(Print &printer)
Definition: PrintStream.cpp:77

Print the error message and error code, and stop the execution if FATAL_ERRORS are enabled.

Otherwise just prints the error.

Parameters
msgThe information to print, can contain streaming operators (<<) to print multiple things.
errcA unique error code.

Definition at line 42 of file Error.hpp.

◆ FATAL_ERROR

#define FATAL_ERROR (   msg,
  errc 
)
Value:
do { \
USING_AH_NAMESPACE; \
DEBUGFN(F("Fatal Error: ") << msg << " (0x" << hex << uppercase \
<< errc << dec << nouppercase << ')'); \
fatalErrorExit(); \
} while (0)

Print the error message and error code, and stop the execution.

Doesn't depend on FATAL_ERRORS, it always stops the execution.

Parameters
msgThe information to print, can contain streaming operators (<<) to print multiple things.
errcA unique error code.

Definition at line 60 of file Error.hpp.