31static const char *__crashreporter_info__ = 0;
32asm(
".desc ___crashreporter_info__, 0x10");
39 static std::mutex *
m =
new std::mutex();
59 TTHREAD_TLS(
Int_t) buf_size = 2048;
60 TTHREAD_TLS(
char*) buf =
nullptr;
67 buf =
new char[buf_size];
69 Int_t n = vsnprintf(buf, buf_size, fmt, ap);
72 if (
n == -1 ||
n >= buf_size) {
88 const char *toprint = buf;
89 fprintf(stderr,
"%s", toprint);
92 ::OutputDebugString(buf);
106 auto cstrlevel =
gEnv->
GetValue(
"Root.ErrorIgnoreLevel",
"Print");
112 while (cstrlevel && *cstrlevel) {
113 slevel.push_back(tolower(*cstrlevel));
117 if (slevel ==
"print")
119 else if (slevel ==
"info")
121 else if (slevel ==
"warning")
123 else if (slevel ==
"error")
125 else if (slevel ==
"break")
127 else if (slevel ==
"syserror")
129 else if (slevel ==
"fatal")
137 const char *
type =
nullptr;
146 type =
"\n *** Break ***";
156 smsg = std::string(
type) +
" " + msg;
157 else if (!location || !location[0])
158 smsg = std::string(
type) +
": " + msg;
160 smsg = std::string(
type) +
" in <" + location +
">: " + msg;
168 if (__crashreporter_info__)
169 delete [] __crashreporter_info__;
170 __crashreporter_info__ = strdup(smsg.c_str());
static void DebugPrint(const char *fmt,...)
Print debugging message to stderr and, on Windows, to the system debugger.
void DefaultErrorHandler(Int_t level, Bool_t abort_bool, const char *location, const char *msg)
The default error handler function.
static std::mutex * GetErrorMutex()
Serializes error output, destructed by the gROOT destructor via ReleaseDefaultErrorHandler()
constexpr Int_t kSysError
R__EXTERN Int_t gErrorIgnoreLevel
R__EXTERN TSystem * gSystem
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual void Abort(int code=0)
Abort the application.
virtual void StackTrace()
Print a stack trace.
void ReleaseDefaultErrorHandler()
Destructs resources that are taken by using the default error handler.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...