74extern "C" void ErrorHandler(
int level,
const char *location,
const char *fmt, std::va_list va);
81extern void Info(
const char *location,
const char *msgfmt, ...)
83__attribute__((format(printf, 2, 3)))
86extern void Warning(
const char *location,
const char *msgfmt, ...)
88__attribute__((format(printf, 2, 3)))
91extern void Error(
const char *location,
const char *msgfmt, ...)
93__attribute__((format(printf, 2, 3)))
96extern void Break(
const char *location,
const char *msgfmt, ...)
98__attribute__((format(printf, 2, 3)))
101extern void SysError(
const char *location,
const char *msgfmt, ...)
103__attribute__((format(printf, 2, 3)))
106extern void Fatal(
const char *location,
const char *msgfmt, ...)
108__attribute__((format(printf, 2, 3)))
113extern void MayNotUse(
const char *method);
114extern void Obsolete(
const char *function,
const char *asOfVers,
const char *removedFromVers);
125#define R__ASSERT(e) \
127 if (R__unlikely(!(e))) \
128 ::Fatal("", kAssertMsg, _QUOTE_(e), __LINE__, __FILE__); \
136 if (R__unlikely(!(e))) \
137 ::Warning("", kCheckMsg, _QUOTE_(e), __LINE__, __FILE__); \
Basic types used by ROOT and required by TInterpreter.
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
void DefaultErrorHandler(int level, Bool_t abort, const char *location, const char *msg)
The default error handler function.
void ErrorHandler(int level, const char *location, const char *fmt, std::va_list va)
General error handler function. It calls the user set error handler.
ErrorHandlerFunc_t GetErrorHandler()
Returns the current error handler function.
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
externconst char * kAssertMsg
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
externconst char * kCheckMsg
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 SysError(const char *location, const char *msgfmt,...)
Use this function in case a system (OS or GUI) related error occurred.
void(* ErrorHandlerFunc_t)(int level, Bool_t abort, const char *location, const char *msg)
void Break(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
externInt_t gErrorAbortLevel
non-ignored errors with level equal or above this value will call abort(). Default is kSysError+1.
void MayNotUse(const char *method)
This function can be used in classes that should override a certain function, but in the inherited cl...
externBool_t gPrintViaErrorHandler
If true, ROOT's Printf will print via the currently active ROOT error handler; if false (default),...
constexpr Int_t kSysError
externInt_t gErrorIgnoreLevel
errors with level below this value will be ignored. Default is kUnset.
void Obsolete(const char *function, const char *asOfVers, const char *removedFromVers)
Use this function to declare a function obsolete.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
ErrorHandlerFunc_t SetErrorHandler(ErrorHandlerFunc_t newhandler)
Set an errorhandler function. Returns the old handler.
void Fatal(const char *location, const char *msgfmt,...)
Use this function in case of a fatal error. It will abort the program.
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()