Logo ROOT  
Reference Guide
TError.h File Reference
#include <ROOT/RConfig.hxx>
#include <DllImport.h>
#include "RtypesCore.h"
#include <cstdarg>
#include <functional>
Include dependency graph for TError.h:

Namespaces

 ROOT
 VSD Structures.
 
 ROOT::Internal
 

Macros

#define R__ASSERT(e)
 
#define R__CHECK(e)
 

Typedefs

typedef void(* ErrorHandlerFunc_t) (int level, Bool_t abort, const char *location, const char *msg)
 
using ROOT::Internal::ErrorSystemMsgHandlerFunc_t = std::function< const char *()>
 Retrieves the error string associated with the last system error. More...
 

Functions

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 "real" (in C++ sense) ABC. More...
 
void Break (const char *location, const char *msgfmt,...)
 Use this function in case an error occurred. More...
 
void DefaultErrorHandler (int level, Bool_t abort, const char *location, const char *msg)
 The default error handler function. More...
 
void Error (const char *location, const char *msgfmt,...)
 Use this function in case an error occurred. More...
 
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. More...
 
void Fatal (const char *location, const char *msgfmt,...)
 Use this function in case of a fatal error. It will abort the program. More...
 
ErrorHandlerFunc_t GetErrorHandler ()
 Returns the current error handler function. More...
 
ErrorSystemMsgHandlerFunc_t ROOT::Internal::GetErrorSystemMsgHandler ()
 
void Info (const char *location, const char *msgfmt,...)
 Use this function for informational messages. More...
 
void MayNotUse (const char *method)
 This function can be used in classes that should override a certain function, but in the inherited class the function makes no sense. More...
 
void ROOT::Internal::MinimalErrorHandler (Int_t level, Bool_t abort_bool, const char *location, const char *msg)
 A very simple error handler that is usually replaced by the TROOT default error handler. More...
 
void Obsolete (const char *function, const char *asOfVers, const char *removedFromVers)
 Use this function to declare a function obsolete. More...
 
R__EXTERN TVirtualMutex *gErrorMutex R__DEPRECATED (6, 26, "ROOT stopped exporting gErrorMutex.")
 
ErrorHandlerFunc_t SetErrorHandler (ErrorHandlerFunc_t newhandler)
 Set an errorhandler function. Returns the old handler. More...
 
ErrorSystemMsgHandlerFunc_t ROOT::Internal::SetErrorSystemMsgHandler (ErrorSystemMsgHandlerFunc_t h)
 Returns the previous system error message handler. More...
 
void SysError (const char *location, const char *msgfmt,...)
 Use this function in case a system (OS or GUI) related error occurred. More...
 
void Warning (const char *location, const char *msgfmt,...)
 Use this function in warning situations. More...
 

Variables

R__EXTERN Int_t gErrorAbortLevel
 
R__EXTERN Int_t gErrorIgnoreLevel
 
R__EXTERN Bool_t gPrintViaErrorHandler
 
const R__EXTERN char * kAssertMsg
 
const Int_t kBreak = 4000
 
const R__EXTERN char * kCheckMsg
 
const Int_t kError = 3000
 
const Int_t kFatal = 6000
 
const Int_t kInfo = 1000
 
const Int_t kPrint = 0
 
const Int_t kSysError = 5000
 
const Int_t kUnset = -1
 
const Int_t kWarning = 2000
 

Macro Definition Documentation

◆ R__ASSERT

#define R__ASSERT (   e)
Value:
do { \
if (!(e)) ::Fatal("", kAssertMsg, _QUOTE_(e), __LINE__, __FILE__); \
} while (false)

Definition at line 120 of file TError.h.

◆ R__CHECK

#define R__CHECK (   e)
Value:
do { \
if (!(e)) ::Warning("", kCheckMsg, _QUOTE_(e), __LINE__, __FILE__); \
} while (false)

Definition at line 124 of file TError.h.

Typedef Documentation

◆ ErrorHandlerFunc_t

typedef void(* ErrorHandlerFunc_t) (int level, Bool_t abort, const char *location, const char *msg)

Definition at line 72 of file TError.h.

Function Documentation

◆ AbstractMethod()

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 "real" (in C++ sense) ABC.

If this function is called it will warn the user that the function should have been overridden.

Definition at line 161 of file TError.cxx.

◆ Break()

void Break ( const char *  location,
const char *  msgfmt,
  ... 
)

Use this function in case an error occurred.

Definition at line 209 of file TError.cxx.

◆ DefaultErrorHandler()

void DefaultErrorHandler ( Int_t  level,
Bool_t  abort_bool,
const char *  location,
const char *  msg 
)

The default error handler function.

It prints the message on stderr and if abort is set it aborts the application. Replaces the minimal error handler of TError.h as part of the gROOT construction. TError's minimal handler is put back in place during the gROOT destruction.

Definition at line 101 of file TErrorDefaultHandler.cxx.

◆ Error()

void Error ( const char *  location,
const char *  msgfmt,
  ... 
)

Use this function in case an error occurred.

Definition at line 187 of file TError.cxx.

◆ ErrorHandler()

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.

Definition at line 111 of file TError.cxx.

◆ Fatal()

void Fatal ( const char *  location,
const char *  msgfmt,
  ... 
)

Use this function in case of a fatal error. It will abort the program.

Definition at line 245 of file TError.cxx.

◆ GetErrorHandler()

ErrorHandlerFunc_t GetErrorHandler ( )

Returns the current error handler function.

Definition at line 102 of file TError.cxx.

◆ Info()

void Info ( const char *  location,
const char *  msgfmt,
  ... 
)

Use this function for informational messages.

Definition at line 220 of file TError.cxx.

◆ MayNotUse()

void MayNotUse ( const char *  method)

This function can be used in classes that should override a certain function, but in the inherited class the function makes no sense.

Definition at line 170 of file TError.cxx.

◆ Obsolete()

void Obsolete ( const char *  function,
const char *  asOfVers,
const char *  removedFromVers 
)

Use this function to declare a function obsolete.

Specify as of which version the method is obsolete and as from which version it will be removed.

Definition at line 179 of file TError.cxx.

◆ R__DEPRECATED()

R__EXTERN TVirtualMutex* gErrorMutex R__DEPRECATED ( ,
26  ,
"ROOT stopped exporting gErrorMutex."   
)

◆ SetErrorHandler()

ErrorHandlerFunc_t SetErrorHandler ( ErrorHandlerFunc_t  newhandler)

Set an errorhandler function. Returns the old handler.

Definition at line 92 of file TError.cxx.

◆ SysError()

void SysError ( const char *  location,
const char *  msgfmt,
  ... 
)

Use this function in case a system (OS or GUI) related error occurred.

Definition at line 198 of file TError.cxx.

◆ Warning()

void Warning ( const char *  location,
const char *  msgfmt,
  ... 
)

Use this function in warning situations.

Definition at line 231 of file TError.cxx.

Variable Documentation

◆ gErrorAbortLevel

R__EXTERN Int_t gErrorAbortLevel

Definition at line 130 of file TError.h.

◆ gErrorIgnoreLevel

R__EXTERN Int_t gErrorIgnoreLevel

Definition at line 129 of file TError.h.

◆ gPrintViaErrorHandler

R__EXTERN Bool_t gPrintViaErrorHandler

Definition at line 131 of file TError.h.

◆ kAssertMsg

const R__EXTERN char* kAssertMsg

Definition at line 117 of file TError.h.

◆ kBreak

const Int_t kBreak = 4000

Definition at line 49 of file TError.h.

◆ kCheckMsg

const R__EXTERN char* kCheckMsg

Definition at line 118 of file TError.h.

◆ kError

const Int_t kError = 3000

Definition at line 48 of file TError.h.

◆ kFatal

const Int_t kFatal = 6000

Definition at line 51 of file TError.h.

◆ kInfo

const Int_t kInfo = 1000

Definition at line 46 of file TError.h.

◆ kPrint

const Int_t kPrint = 0

Definition at line 45 of file TError.h.

◆ kSysError

const Int_t kSysError = 5000

Definition at line 50 of file TError.h.

◆ kUnset

const Int_t kUnset = -1

Definition at line 44 of file TError.h.

◆ kWarning

const Int_t kWarning = 2000

Definition at line 47 of file TError.h.

e
#define e(i)
Definition: RSha256.hxx:121
Warning
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Definition: TError.cxx:231
kAssertMsg
const R__EXTERN char * kAssertMsg
Definition: TError.h:117
Fatal
void Fatal(const char *location, const char *msgfmt,...)
Use this function in case of a fatal error. It will abort the program.
Definition: TError.cxx:245
kCheckMsg
const R__EXTERN char * kCheckMsg
Definition: TError.h:118
_QUOTE_
#define _QUOTE_(name)
Definition: RConfig.hxx:447