GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4UserException.h
Go to the documentation of this file.
1 // $Id: TGo4UserException.h 507 2009-11-06 13:47:05Z adamczew $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4USEREXCEPTION_H
15 #define TGO4USEREXCEPTION_H
16 
17 #include "TGo4RuntimeException.h"
18 
19 #include "TString.h"
20 
21 /* will skip subsequent steps for this event silently and start next event */
22 #define GO4_SKIP_EVENT throw TGo4UserException(1,"");
23 
24 /* will skip subsequent steps for this event and start next event,
25  * will send printf style message to gui */
26 #define GO4_SKIP_EVENT_MESSAGE(...) throw TGo4UserException(1,__VA_ARGS__);
27 
28 /* will stop analysis without message to gui */
29 #define GO4_STOP_ANALYSIS throw TGo4UserException(3,"");
30 
31 /* will stop analysis with a printf style message to gui */
32 #define GO4_STOP_ANALYSIS_MESSAGE(...) throw TGo4UserException(3,__VA_ARGS__);
33 
34 
35 
43 
44  public:
45 
46  TGo4UserException (Int_t prio, const char* text,...);
47 
48  virtual ~TGo4UserException();
49 
50  Int_t Handle ();
51 
53 
55 
57  Int_t GetPriority() const { return fiPriority; }
58 
60  const char* GetMessage() const { return fxMessage.Data(); }
61 
62  protected:
63 
65  TString fxMessage;
66 
68  Int_t fiPriority;
69 
70  private:
72 };
73 
74 #endif // #define
TGo4UserException & operator=(const TGo4UserException &right)
Int_t GetPriority() const
const char * GetMessage() const