X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Flog.h;h=8a5882c03a94a40fe45bbddb3758235ce421bd4e;hp=fdf30a7cd1593ec26c69e151e9549682f8ab83b8;hb=HEAD;hpb=433bde2ed090928b264203c9f422a5b220857120 diff --git a/src/log.h b/src/log.h index fdf30a7..8a5882c 100644 --- a/src/log.h +++ b/src/log.h @@ -37,10 +37,11 @@ inline std::string methodName(const std::string& prettyFunction) #define Debug(...) LogEx(LOG_DEBUG, __func__, __FILE__, __LINE__, __VA_ARGS__) #define Error(...) LogEx(LOG_ERR, __func__, __FILE__, __LINE__, __VA_ARGS__) #define Warn(...) LogEx(LOG_WARNING, __func__, __FILE__, __LINE__, __VA_ARGS__) +extern void Backtrace(int size=10); extern void LogEx(int level, const char * funct, const char * file, int line, ...); // General function for printing log messages to stderr -extern void FatalEx(const char * funct, const char * file, int line, ...); // Function that deals with a fatal error (prints a message, then exits the program). +extern void FatalEx(const char * funct, const char * file, int line, ...) __attribute__((__noreturn__)); // Function that deals with a fatal error (prints a message, then exits the program). #endif //_LOG_H