Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions core/foundation/inc/TError.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@

class TVirtualMutex;

constexpr Int_t kUnset = -1;
constexpr Int_t kPrint = 0;
constexpr Int_t kInfo = 1000;
constexpr Int_t kWarning = 2000;
constexpr Int_t kError = 3000;
constexpr Int_t kBreak = 4000;
constexpr Int_t kSysError = 5000;
constexpr Int_t kFatal = 6000;

R__EXTERN const Int_t kUnset;
R__EXTERN const Int_t kPrint;
R__EXTERN const Int_t kInfo;
R__EXTERN const Int_t kWarning;
R__EXTERN const Int_t kError;
R__EXTERN const Int_t kBreak;
R__EXTERN const Int_t kSysError;
R__EXTERN const Int_t kFatal;

// TROOT sets the error ignore level handler, the system error message handler, and the error abort handler on
// construction such that the "Root.ErrorIgnoreLevel" environment variable is used for the ignore level
Expand Down
2 changes: 1 addition & 1 deletion core/foundation/src/RLogger.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ inline bool RLogHandlerDefault::Emit(const RLogEntry &entry)
if (!entry.fLocation.fFuncName.empty())
strm << " in " << entry.fLocation.fFuncName;

static constexpr const int errorLevelOld[] = {kFatal /*unset*/, kFatal, kError, kWarning, kInfo, kInfo /*debug*/};
static const int errorLevelOld[] = {kFatal /*unset*/, kFatal, kError, kWarning, kInfo, kInfo /*debug*/};
(*::GetErrorHandler())(errorLevelOld[cappedLevel], entry.fLevel == ELogLevel::kFatal, strm.str().c_str(),
entry.fMessage.c_str());
return true;
Expand Down
9 changes: 9 additions & 0 deletions core/foundation/src/TError.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ to be replaced by the proper DefaultErrorHandler()
// Deprecated
TVirtualMutex *gErrorMutex = nullptr;

const Int_t kUnset = -1;
const Int_t kPrint = 0;
const Int_t kInfo = 1000;
const Int_t kWarning = 2000;
const Int_t kError = 3000;
const Int_t kBreak = 4000;
const Int_t kSysError = 5000;
const Int_t kFatal = 6000;

Int_t gErrorIgnoreLevel = kUnset;
Int_t gErrorAbortLevel = kSysError+1;
Bool_t gPrintViaErrorHandler = kFALSE;
Expand Down