Logo ROOT  
Reference Guide
TError.cxx File Reference
#include "TError.h"
#include "ThreadLocalStorage.h"
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cerrno>
#include <string>
Include dependency graph for TError.cxx:

Namespaces

 ROOT
 VSD Structures.
 
 ROOT::Internal
 

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 *fmt,...)
 Use this function in case an error occurred. More...
 
void Error (const char *location, const char *fmt,...)
 Use this function in case an error occurred. More...
 
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. More...
 
void Fatal (const char *location, const char *fmt,...)
 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 ()
 
static ROOT::Internal::ErrorSystemMsgHandlerFunc_tGetErrorSystemMsgHandlerRef ()
 
void Info (const char *location, const char *fmt,...)
 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...
 
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 *fmt,...)
 Use this function in case a system (OS or GUI) related error occurred. More...
 
void Warning (const char *location, const char *fmt,...)
 Use this function in warning situations. More...
 

Variables

Int_t gErrorAbortLevel = kSysError+1
 
static ErrorHandlerFunc_t gErrorHandler = ROOT::Internal::MinimalErrorHandler
 
Int_t gErrorIgnoreLevel = kUnset
 
TVirtualMutexgErrorMutex = nullptr
 Error handling routines. More...
 
Bool_t gPrintViaErrorHandler = kFALSE
 
const char * kAssertMsg = "%s violated at line %d of `%s'"
 
const char * kCheckMsg = "%s not true at line %d of `%s'"
 

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 162 of file TError.cxx.

◆ Break()

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

Use this function in case an error occurred.

Definition at line 210 of file TError.cxx.

◆ Error()

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

Use this function in case an error occurred.

Definition at line 188 of file TError.cxx.

◆ ErrorHandler()

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.

Definition at line 112 of file TError.cxx.

◆ Fatal()

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

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

Definition at line 246 of file TError.cxx.

◆ GetErrorHandler()

ErrorHandlerFunc_t GetErrorHandler ( )

Returns the current error handler function.

Definition at line 103 of file TError.cxx.

◆ GetErrorSystemMsgHandlerRef()

static ROOT::Internal::ErrorSystemMsgHandlerFunc_t& GetErrorSystemMsgHandlerRef ( )
static

Definition at line 45 of file TError.cxx.

◆ Info()

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

Use this function for informational messages.

Definition at line 221 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 171 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 180 of file TError.cxx.

◆ SetErrorHandler()

ErrorHandlerFunc_t SetErrorHandler ( ErrorHandlerFunc_t  newhandler)

Set an errorhandler function. Returns the old handler.

Definition at line 93 of file TError.cxx.

◆ SysError()

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

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

Definition at line 199 of file TError.cxx.

◆ Warning()

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

Use this function in warning situations.

Definition at line 232 of file TError.cxx.

Variable Documentation

◆ gErrorAbortLevel

Int_t gErrorAbortLevel = kSysError+1

Definition at line 36 of file TError.cxx.

◆ gErrorHandler

Definition at line 42 of file TError.cxx.

◆ gErrorIgnoreLevel

Int_t gErrorIgnoreLevel = kUnset

Definition at line 35 of file TError.cxx.

◆ gErrorMutex

TVirtualMutex* gErrorMutex = nullptr

Error handling routines.

This file defines a number of global error handling routines: Warning(), Error(), SysError() and Fatal(). They all take a location string (where the error happened) and a printf style format string plus vararg's. In the end these functions call an errorhandler function. Initially the MinimalErrorHandler, which is supposed to be replaced by the proper DefaultErrorHandler()

Definition at line 33 of file TError.cxx.

◆ gPrintViaErrorHandler

Bool_t gPrintViaErrorHandler = kFALSE

Definition at line 37 of file TError.cxx.

◆ kAssertMsg

const char* kAssertMsg = "%s violated at line %d of `%s'"

Definition at line 39 of file TError.cxx.

◆ kCheckMsg

const char* kCheckMsg = "%s not true at line %d of `%s'"

Definition at line 40 of file TError.cxx.