ROOT
6.07/01
Reference Guide
|
#include <stdio.h>
#include <stdlib.h>
#include "snprintf.h"
#include "Varargs.h"
#include "Riostream.h"
#include "TError.h"
#include "TSystem.h"
#include "TString.h"
#include "TEnv.h"
#include "TVirtualMutex.h"
#include "ThreadLocalStorage.h"
Go to the source code of this file.
Functions | |
static void | DebugPrint (const char *fmt,...) |
Print debugging message to stderr and, on Windows, to the system debugger. More... | |
ErrorHandlerFunc_t | SetErrorHandler (ErrorHandlerFunc_t newhandler) |
Set an errorhandler function. Returns the old handler. More... | |
ErrorHandlerFunc_t | GetErrorHandler () |
Returns the current error handler function. More... | |
void | DefaultErrorHandler (Int_t level, Bool_t abort_bool, const char *location, const char *msg) |
The default error handler function. More... | |
void | ErrorHandler (Int_t level, const char *location, const char *fmt, va_list ap) |
General error handler function. It calls the user set error handler. More... | |
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 | 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 | Obsolete (const char *function, const char *asOfVers, const char *removedFromVers) |
Use this function to declare a function obsolete. More... | |
void | Error (const char *location, const char *va_(fmt),...) |
Use this function in case an error occurred. More... | |
void | SysError (const char *location, const char *va_(fmt),...) |
Use this function in case a system (OS or GUI) related error occurred. More... | |
void | Break (const char *location, const char *va_(fmt),...) |
Use this function in case an error occurred. More... | |
void | Info (const char *location, const char *va_(fmt),...) |
Use this function for informational messages. More... | |
void | Warning (const char *location, const char *va_(fmt),...) |
Use this function in warning situations. More... | |
void | Fatal (const char *location, const char *va_(fmt),...) |
Use this function in case of a fatal error. It will abort the program. More... | |
Variables | |
TVirtualMutex * | gErrorMutex = 0 |
Error handling routines. More... | |
Int_t | gErrorIgnoreLevel = kUnset |
Int_t | gErrorAbortLevel = kSysError+1 |
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'" |
static ErrorHandlerFunc_t | gErrorHandler = DefaultErrorHandler |
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 260 of file TError.cxx.
Referenced by ClassImp(), and TXHandler::HandleError().
void Break | ( | const char * | location, |
const char * | va_fmt, | ||
... | |||
) |
Use this function in case an error occurred.
Definition at line 310 of file TError.cxx.
|
static |
Print debugging message to stderr and, on Windows, to the system debugger.
Definition at line 64 of file TError.cxx.
Referenced by 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.
Definition at line 125 of file TError.cxx.
Referenced by PyROOT::Utility::ErrMsgHandler().
void Error | ( | const char * | location, |
const char * | va_fmt, | ||
... | |||
) |
Use this function in case an error occurred.
Use this function in case an error occured.
Definition at line 288 of file TError.cxx.
Referenced by ROOT::TMetaUtils::AddDefaultParameters(), areEqualTypes(), SelectionRules::CheckDuplicates(), XMLReader::CheckIsTagOK(), ROOT::TMetaUtils::AST2SourceTools::FwdDeclFromTmplDecl(), ROOT::Internal::RStl::GenerateTClassFor(), XMLReader::GetAttributes(), ROOT::TMetaUtils::GetROOTIncludeDir(), ROOT::TMetaUtils::IsBase(), SelectionRules::IsClassSelected(), ROOT::TMetaUtils::IsOfType(), KeepNParams(), XMLReader::Parse(), ROOT::TMetaUtils::AST2SourceTools::PrepareArgsForFwdDecl(), replaceEnvVars(), and RScanner::TreatRecordDeclOrTypedefNameDecl().
General error handler function. It calls the user set error handler.
Definition at line 202 of file TError.cxx.
Referenced by Break(), ClassImp(), Debug(), TXSlave::DoError(), TObject::DoError(), TXSocket::DoError(), Error(), Fatal(), Info(), Printf(), SysError(), and Warning().
void Fatal | ( | const char * | location, |
const char * | va_fmt, | ||
... | |||
) |
Use this function in case of a fatal error. It will abort the program.
Definition at line 343 of file TError.cxx.
ErrorHandlerFunc_t GetErrorHandler | ( | ) |
Returns the current error handler function.
Definition at line 116 of file TError.cxx.
Referenced by TThread::ErrorHandler(), and TThread::XAction().
void Info | ( | const char * | location, |
const char * | va_fmt, | ||
... | |||
) |
Use this function for informational messages.
Definition at line 321 of file TError.cxx.
Referenced by XMLReader::GetAttributes(), Implies(), XMLReader::Parse(), RScanner::TreatRecordDeclOrTypedefNameDecl(), and ROOT::TMetaUtils::WriteClassCode().
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 269 of file TError.cxx.
Referenced by ClassImp(), and TGenCollectionProxy::ReadBuffer().
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 278 of file TError.cxx.
Referenced by TStorage::AddToHeap(), TStorage::GetHeapBegin(), TStorage::GetHeapEnd(), TString::GetInitialCapacity(), TString::GetMaxWaste(), TString::GetResizeIncrement(), TString::InitialCapacity(), TStorage::IsOnHeap(), TString::MaxWaste(), TStorage::ReAlloc(), and TString::ResizeIncrement().
ErrorHandlerFunc_t SetErrorHandler | ( | ErrorHandlerFunc_t | newhandler | ) |
Set an errorhandler function. Returns the old handler.
Definition at line 106 of file TError.cxx.
Referenced by ClassImp(), PyROOT::TPyROOTApplication::InitROOTMessageCallback(), TProofPlayerRemote::RedirectOutput(), TGuiBldDragManager::TGuiBldDragManager(), and TProofServ::TProofServ().
void SysError | ( | const char * | location, |
const char * | va_fmt, | ||
... | |||
) |
Use this function in case a system (OS or GUI) related error occurred.
Use this function in case a system (OS or GUI) related error occured.
Definition at line 299 of file TError.cxx.
void Warning | ( | const char * | location, |
const char * | va_fmt, | ||
... | |||
) |
Use this function in warning situations.
Definition at line 332 of file TError.cxx.
Referenced by AbstractMethod(), ROOT::TMetaUtils::AnnotatedRecordDecl::AnnotatedRecordDecl(), SelectionRules::AreAllSelectionRulesUsed(), ROOT::TMetaUtils::AST2SourceTools::FwdDeclFromTmplDecl(), ROOT::Internal::RStl::GenerateTClassFor(), XMLReader::GetAttributes(), HasDuplicate(), SelectionRules::IsMemberSelected(), MayNotUse(), Obsolete(), ROOT::TMetaUtils::AST2SourceTools::PrepareArgsForFwdDecl(), and RScanner::TreatRecordDeclOrTypedefNameDecl().
Definition at line 44 of file TError.cxx.
Referenced by ErrorHandler().
|
static |
Definition at line 58 of file TError.cxx.
Referenced by ErrorHandler(), GetErrorHandler(), and SetErrorHandler().
Definition at line 43 of file TError.cxx.
Referenced by DefaultErrorHandler(), ROOT::TMetaUtils::AST2SourceTools::FwdDeclFromRcdDecl(), ROOT::TMetaUtils::AST2SourceTools::FwdDeclFromTypeDefNameDecl(), and ROOT::TMetaUtils::LevelPrint().
TVirtualMutex* gErrorMutex = 0 |
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. By default DefaultErrorHandler() is used.
Definition at line 41 of file TError.cxx.
Definition at line 45 of file TError.cxx.
Definition at line 47 of file TError.cxx.
Definition at line 48 of file TError.cxx.