#ifndef ROOT_TFError
#define ROOT_TFError
#ifndef ROOT_TString
#include "TString.h"
#endif
enum TFErrorType {kNoErr = 0, kStoreErr = 1, kExceptionErr = 2, kAllErr = 3};
class TFErrMsg
{
public:
TString fFunction;
TString fMsg;
TFErrMsg * fNext;
TFErrMsg() {fNext = NULL;}
~TFErrMsg() {delete fNext;}
virtual void Add(TFErrMsg * errMsg);
virtual TFErrMsg * Remove();
private:
ClassDef(TFErrMsg,0)
};
class TFError
{
static Int_t fMaxErrors;
static Int_t fNumErrors;
static TFErrMsg * fErrMsgs;
static TFErrorType fErrorType;
public:
TFError() {}
static void AddError(TString & function, TString & errorMsg);
static void SetError(const char * function, const char * errorMsg, ...);
static void RemveLastError();
static void ClearErrors();
static Bool_t IsError() {return NumErrors() > 0;}
static Int_t NumErrors() {return fNumErrors;}
static void SetErrorType(TFErrorType eType = kAllErr)
{fErrorType = eType;}
static TFErrorType GetErrorType() {return fErrorType;}
static void PrintErrors();
static char * GetError(int num, char * errStr);
static void SetMaxErrors(Int_t num);
static Int_t GetMaxErrors() {return fMaxErrors;}
private:
ClassDef(TFError,0)
};
class TFException
{
protected:
TString fFunction;
TString fMsg;
public:
TFException() {}
TFException(const char * function, const char * errorMsg, ...);
void PrintError();
void AddToError() {TFError::AddError(fFunction, fMsg);}
ClassDef(TFException,0)
};
#endif
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.