GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4UserException.cxx
Go to the documentation of this file.
1 // $Id: TGo4UserException.cxx 999 2013-07-25 11:58:59Z linev $
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 #include "TGo4UserException.h"
15 
16 #include "snprintf.h"
17 
18 #include "TGo4Log.h"
19 #include "TGo4AnalysisImp.h"
20 
23  fxMessage(),
24  fiPriority(0)
25 {
26 }
27 
28 TGo4UserException::TGo4UserException (Int_t prio, const char* text,...) :
30  fxMessage(),
31  fiPriority(prio)
32 {
33  GO4TRACE((14,"TGo4UserException:TGo4UserException (TGo4TaskHandler*)", __LINE__, __FILE__));
34  fxDescription= "!!!-- Go4 User Exception --!!!";
35  // put potential printf arguments in text:
36  char txtbuf[TGo4Log::fguMESLEN];
37  va_list args;
38  va_start(args, text);
39  vsnprintf(txtbuf, TGo4Log::fguMESLEN, text, args);
40  va_end(args);
41  fxMessage = txtbuf;
42 }
43 
45 {
46  GO4TRACE((14,"TGo4UserException:~TGo4UserException", __LINE__, __FILE__));
47 
48 }
49 
51 {
52  GO4TRACE((14,"TGo4UserException:operator=",__LINE__, __FILE__));
53  if (&right!=this)
54  {
55  TGo4RuntimeException::operator=(right); // copy base class members
56  // put additional member copies here...
57  fxMessage=right.fxMessage;
58  fiPriority=right.fiPriority;
59  return *this;
60  }
61  else
62  {
63  // copy is already source object
64  return *this;
65  }
66 }
67 
69  :TGo4RuntimeException(right)
70 {
71  GO4TRACE((14,"TGo4UserException:TGo4UserException(right)", __LINE__, __FILE__));
72  fxMessage=right.fxMessage;
73  fiPriority=right.fiPriority;
74 }
75 
77 {
78  GO4TRACE((12,"TGo4UserException::Handle()", __LINE__, __FILE__));
80 
81  return 0;
82 }
TGo4UserException & operator=(const TGo4UserException &right)
Int_t GetPriority() const
static const char * Message(Int_t prio, const char *text,...)
Definition: TGo4Log.cxx:209
TGo4RuntimeException & operator=(const TGo4RuntimeException &right)
#define GO4TRACE(X)
Definition: TGo4Log.h:26
TString fxDescription
Definition: TGo4Exception.h:38
const char * GetMessage() const