diff --git a/core/foundation/inc/TError.h b/core/foundation/inc/TError.h index 0099d8e538704..2948a70e6844e 100644 --- a/core/foundation/inc/TError.h +++ b/core/foundation/inc/TError.h @@ -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 diff --git a/core/foundation/src/RLogger.cxx b/core/foundation/src/RLogger.cxx index de9eb939ab8ec..18ba9f954d959 100644 --- a/core/foundation/src/RLogger.cxx +++ b/core/foundation/src/RLogger.cxx @@ -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; diff --git a/core/foundation/src/TError.cxx b/core/foundation/src/TError.cxx index 8f27b76c5d72b..969f11f48a33a 100644 --- a/core/foundation/src/TError.cxx +++ b/core/foundation/src/TError.cxx @@ -28,6 +28,15 @@ to be replaced by the proper DefaultErrorHandler() #include #include +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;