class TFError


  File:      TFError.cpp

  Version:   1.0

  Author:    Reiner Rohlfs (GADC)

  History:   1.0   11.07.03  first released version


Function Members (Methods)

public:
TFError()
TFError(const TFError&)
~TFError()
static voidAddError(TString& function, TString& errorMsg)
static TClass*Class()
static voidClearErrors()
static char*GetError(int num, char* errStr)
static TFErrorTypeGetErrorType()
static Int_tGetMaxErrors()
virtual TClass*IsA() const
static Bool_tIsError()
static Int_tNumErrors()
TFError&operator=(const TFError&)
static voidPrintErrors()
static voidRemveLastError()
static voidSetError(const char* function, const char* errorMsg)
static voidSetErrorType(TFErrorType eType = kAllErr)
static voidSetMaxErrors(Int_t num)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)

Data Members

private:
static TFErrMsg*fErrMsgsroot of a list of error messages
static TFErrorTypefErrorTypetype of error handling: store, exception
static Int_tfMaxErrorsmaximum number of stored errors
static Int_tfNumErrorsactual number of stored errors

Class Charts

Inheritance Chart:
TFError

Function documentation

void AddError(TString& function, TString& errorMsg)
 Adds one error message. The function name and a message should be
 specified. The default length of the function name at the printout
 functions GetError() and PrintErrors(), is 24 characters.
 Independent of a previous call of SetErrorType() this function will
 always store the error message and will never throw an
 TFException - ecxeption.
void SetError(const char * function, const char * errorMsg, ...)
 Set one error message. The function name and a message should be
 specified. The default length of the function name at the printout
 functions GetError() and PrintErrors(), is 24 characters.
 The maximum length of the errorMsg is 1999 characters.
 Depending on a previous call of SetErrorType() this function will store
 the error message, will throw an TFException - ecxeption or will do both.
void RemveLastError()
 Removes the last, the youngest, error message from the list of messages
void ClearErrors()
 Removes all error messages
void SetMaxErrors(Int_t num)
 Set the maximum number of stored error messages. The default value is 20
 The function will remove the oldest error messages if the number is set
 to be less than the actual stored error messages.
void PrintErrors()
 Prints all error messages on standard output
 The oldest error is printed first
char * GetError(int num, char* errStr)
 Gets one error message as string. The function and the error message
 is copied into the string errStr and the pointer errStr is returned.
 num defines the 0 based index of the message. The errStr will be empty
 if num >=  NumErrors(). The oldes error has num == 0.
 errStr has to be long enough to hold the function name and the error
 message. 2100 bytes should always be enough
TFError(const TFError& )
{}
Bool_t IsError()
{return NumErrors() > 0;}
Int_t NumErrors()
{return fNumErrors;}
void SetErrorType(TFErrorType eType = kAllErr)
{fErrorType = eType;}
TFErrorType GetErrorType()
{return fErrorType;}
Int_t GetMaxErrors()
{return fMaxErrors;}

Author: (GADC)
Last update: Fri Mar 14 13:55:15 2008

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.