distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
FATAL_ERROR.h
Go to the documentation of this file.
1 
12 #ifndef INCLUDE_DISTORTOS_FATAL_ERROR_H_
13 #define INCLUDE_DISTORTOS_FATAL_ERROR_H_
14 
16 
17 #ifndef FATAL_ERROR_FUNCTION
18 
28 #ifdef __cplusplus
29 #define FATAL_ERROR_FUNCTION __PRETTY_FUNCTION__
30 #elif __STDC_VERSION__ >= 199901L
31 #define FATAL_ERROR_FUNCTION __func__
32 #else
33 #define FATAL_ERROR_FUNCTION __FUNCTION__
34 #endif
35 
36 #endif /* !def FATAL_ERROR_FUNCTION */
37 
38 #undef FATAL_ERROR
39 
46 #define FATAL_ERROR(message) fatalErrorHandler(__FILE__, __LINE__, FATAL_ERROR_FUNCTION, (message))
47 
48 #endif /* INCLUDE_DISTORTOS_FATAL_ERROR_H_ */
fatalErrorHandler() header