Control Surface  1.1.1
MIDI Control Surface library for Arduino
Macros

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

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

Detailed Description

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

Macro Definition Documentation

◆ ERROR

#define ERROR (   msg,
  errc 
)
Value:
do { \
DEBUGFN(msg << " (0x" << hex << uppercase << errc << dec \
<< nouppercase << ')'); \
} while (0)

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.
Examples
2.VU-Meter-OLED-USB-DAC.ino, MCU-OLED-SSD1306-MEGA.ino, MCU-OLED-SSD1306-x2.ino, MCU-OLED-SSD1306.ino, and VU-Meter-Bridge.ino.

Definition at line 60 of file Error.hpp.

nouppercase
Print & nouppercase(Print &printer)
Definition: PrintStream.cpp:40
uppercase
Print & uppercase(Print &printer)
Definition: PrintStream.cpp:35
hex
Print & hex(Print &printer)
Definition: PrintStream.cpp:62
MIDI_Notes::F
constexpr int8_t F
Definition: Notes.hpp:23
dec
Print & dec(Print &printer)
Definition: PrintStream.cpp:77