KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
Macros
KVError.h File Reference
#include "TError.h"
#include "TClass.h"
Include dependency graph for KVError.h:
This graph shows which files directly or indirectly include this file:

Macros

#define KV__ERROR(method)   Form("%s::"#method,IsA()->GetName())
 

Detailed Description

Defines macros for standard error messages.

In classes which inherit from TObject, we use the methods TObject::Error, TObject::Warning etc.

In classes which do not inherit from TObject, we can still use the same standard messages, by adding

#include "KVError.h"
Defines macros for standard error messages.

and by defining the following macro

#define KV__ERROR(method) Form("%s::"#method,IsA()->GetName())

we can then use the following to give e.g. a Warning in a method whose name is SomeMethod:

Warning( KV__ERROR(SomeMethod), "Something is wrong, x=%d", x);
#define KV__ERROR(method)
Definition: KVError.h:30
void Warning(const char *location, const char *va_(fmt),...)

the Warning will appear with "ClassName::SomeMethod", ClassName being the class of the actual object (i.e. name of derived class if object inherits from class in which SomeMethod is defined).

Definition in file KVError.h.

Macro Definition Documentation

◆ KV__ERROR

#define KV__ERROR (   method)    Form("%s::"#method,IsA()->GetName())

Definition at line 30 of file KVError.h.