32static const char *__crashreporter_info__ = 0;
33asm(
".desc ___crashreporter_info__, 0x10");
40 static std::mutex *
m =
new std::mutex();
60 TTHREAD_TLS(
Int_t) buf_size = 2048;
61 TTHREAD_TLS(
char*) buf =
nullptr;
68 buf =
new char[buf_size];
70 Int_t n = vsnprintf(buf, buf_size, fmt, ap);
73 if (
n == -1 ||
n >= buf_size) {
89 const char *toprint = buf;
90 fprintf(stderr,
"%s", toprint);
93 ::OutputDebugString(buf);
108 auto cstrlevel =
gEnv->
GetValue(
"Root.ErrorIgnoreLevel",
"Print");
114 while (cstrlevel && *cstrlevel) {
115 slevel.push_back(tolower(*cstrlevel));
119 if (slevel ==
"print")
121 else if (slevel ==
"info")
123 else if (slevel ==
"warning")
125 else if (slevel ==
"error")
127 else if (slevel ==
"break")
129 else if (slevel ==
"syserror")
131 else if (slevel ==
"fatal")
139 const char *
type =
"?";
148 type =
"\n *** Break ***";
158 smsg = std::string(
type) +
" " + msg;
159 else if (!location || !location[0])
160 smsg = std::string(
type) +
": " + msg;
162 smsg = std::string(
type) +
" in <" + location +
">: " + msg;
170 if (__crashreporter_info__)
171 delete [] __crashreporter_info__;
172 __crashreporter_info__ = strdup(smsg.c_str());
189void WarningHandlerErrorHandler(
Int_t level,
Bool_t abort,
const char *location,
const char *msg)
208 gWarningHandler = handler;
bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
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()
Int_t gErrorIgnoreLevel
errors with level below this value will be ignored. Default is kUnset.
constexpr Int_t kSysError
ErrorHandlerFunc_t SetErrorHandler(ErrorHandlerFunc_t newhandler)
Set an errorhandler function. Returns the old handler.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
R__EXTERN TSystem * gSystem
R__EXTERN TVirtualMutex * gGlobalMutex
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.
bool(*)(const char *location, const char *msg) WarningHandlerFunc_t
void ReleaseDefaultErrorHandler()
Destructs resources that are taken by using the default error handler.
void SetWarningHandler(WarningHandlerFunc_t handler)
For the Python bindings: install an error handler that passes warnings to handler,...