#ifndef ERRORS_REPORT_H #define ERRORS_REPORT_H #include "cstring.h" #include "errors/exceptions.h" #include "object.h" extern boolean stacktrace; #define firstreportargument(ARGUMENT, ...) (ARGUMENT) #define report(...) _Generic( \ firstreportargument(__VA_ARGS__, 0), \ char *: textmessage, \ const char *: textmessage, \ object: reportobject, \ struct exception: reportexception \ )(__VA_ARGS__, __func__, __LINE__, __FILE__) void dumpobject(cstring, object); void reportexception(struct exception, cstring, int, cstring); void reportobject(object, cstring, int, cstring); void textmessage(cstring, cstring, ...); #endif