38const char *
kAssertMsg =
"%s violated at line %d of `%s'";
39const char *
kCheckMsg =
"%s not true at line %d of `%s'";
75 fprintf(stderr,
"\n *** Break *** ");
76 fprintf(stderr,
"<%s>: %s\n", location ? location :
"unspecified location", msg);
79 fprintf(stderr,
"aborting\n");
113 thread_local Int_t buf_size(256);
114 thread_local char *buf_storage(
nullptr);
117 char *buf = buf_storage ? buf_storage : small_buf;
119 std::va_list ap_copy;
123 fmt =
"no error message provided";
125 Int_t n = vsnprintf(buf, buf_size, fmt, ap_copy);
130 if (buf != &(small_buf[0]))
132 buf_storage = buf =
new char[buf_size];
136 vsnprintf(buf, buf_size, fmt, ap_copy);
140 std::string bp = buf;
146 bp += std::string(
"(errno: ") + std::to_string(errno) +
")";
163 Warning(method,
"this method must be overridden!");
172 Warning(method,
"may not use this method");
179void Obsolete(
const char *function,
const char *asOfVers,
const char *removedFromVers)
181 Warning(function,
"obsolete as of %s and will be removed from %s", asOfVers, removedFromVers);
187void Error(
const char *location,
const char *fmt, ...)
198void SysError(
const char *location,
const char *fmt, ...)
209void Break(
const char *location,
const char *fmt, ...)
220void Info(
const char *location,
const char *fmt, ...)
231void Warning(
const char *location,
const char *fmt, ...)
245void Fatal(
const char *location,
const char *fmt, ...)
void Error(const char *location, const char *fmt,...)
Use this function in case an error occurred.
void Break(const char *location, const char *fmt,...)
Use this function in case an error occurred.
ErrorHandlerFunc_t GetErrorHandler()
Returns the current error handler function.
void Info(const char *location, const char *fmt,...)
Use this function for informational messages.
static ErrorHandlerFunc_t gErrorHandler
void SysError(const char *location, const char *fmt,...)
Use this function in case a system (OS or GUI) related error occurred.
TVirtualMutex * gErrorMutex
Error handling routines.
static ROOT::Internal::ErrorSystemMsgHandlerFunc_t & GetErrorSystemMsgHandlerRef()
void AbstractMethod(const char *method)
This function can be used in abstract base classes in case one does not want to make the class a "rea...
void ErrorHandler(Int_t level, const char *location, const char *fmt, std::va_list ap)
General error handler function. It calls the user set error handler.
void Warning(const char *location, const char *fmt,...)
Use this function in warning situations.
void MayNotUse(const char *method)
This function can be used in classes that should override a certain function, but in the inherited cl...
void Fatal(const char *location, const char *fmt,...)
Use this function in case of a fatal error. It will abort the program.
void Obsolete(const char *function, const char *asOfVers, const char *removedFromVers)
Use this function to declare a function obsolete.
ErrorHandlerFunc_t SetErrorHandler(ErrorHandlerFunc_t newhandler)
Set an errorhandler function. Returns the old handler.
Bool_t gPrintViaErrorHandler
void(* ErrorHandlerFunc_t)(int level, Bool_t abort, const char *location, const char *msg)
constexpr Int_t kSysError
R__EXTERN Int_t gErrorIgnoreLevel
This class implements a mutex interface.
std::function< const char *()> ErrorSystemMsgHandlerFunc_t
Retrieves the error string associated with the last system error.
void MinimalErrorHandler(int level, Bool_t abort, const char *location, const char *msg)
A very simple error handler that is usually replaced by the TROOT default error handler.
ErrorSystemMsgHandlerFunc_t SetErrorSystemMsgHandler(ErrorSystemMsgHandlerFunc_t h)
Returns the previous system error message handler.
ErrorSystemMsgHandlerFunc_t GetErrorSystemMsgHandler()
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...