10 #ifndef PLASMA_ERROR_H 11 #define PLASMA_ERROR_H 21 #define plasma_warning(msg) \ 22 plasma_warning_func_line_file(__func__, __LINE__, __FILE__, msg) 24 #define plasma_error(msg) \ 25 plasma_error_func_line_file(__func__, __LINE__, __FILE__, msg) 27 #define plasma_error_with_code(msg, code) \ 28 plasma_error_func_line_file_code(__func__, __LINE__, __FILE__, msg, \ 31 #define plasma_fatal_error(msg) \ 32 plasma_fatal_error_func_line_file(__func__, __LINE__, __FILE__, msg) 35 static inline void plasma_warning_func_line_file(
36 char const *func,
int line,
const char *file,
const char *msg)
39 "PLASMA WARNING at %d of %s() in %s: %s\n",
40 line, func, file, msg);
44 static inline void plasma_error_func_line_file(
45 char const *func,
int line,
const char *file,
const char *msg)
48 "PLASMA ERROR at %d of %s() in %s: %s\n",
49 line, func, file, msg);
53 static inline void plasma_error_func_line_file_code(
54 char const *func,
int line,
const char *file,
const char *msg,
int code)
57 "PLASMA ERROR at %d of %s() in %s: %s %d\n",
58 line, func, file, msg, code);
62 static inline void plasma_fatal_error_func_line_file(
63 char const *func,
int line,
const char *file,
const char *msg)
66 "PLASMA FATAL ERROR at %d of %s() in %s: %s\n",
67 line, func, file, msg);
75 #endif // PLASMA_ERROR_H