Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4UserException.cxx

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #include "TGo4UserException.h"
00017 
00018 #include "snprintf.h"
00019 
00020 #include "TGo4Log.h"
00021 #include "TGo4AnalysisImp.h"
00022 
00023 TGo4UserException::TGo4UserException() :
00024    TGo4RuntimeException(),
00025    fxMessage(),
00026    fiPriority(0)
00027 {
00028 }
00029 
00030 TGo4UserException::TGo4UserException (Int_t prio, const char* text,...) :
00031    TGo4RuntimeException(),
00032    fxMessage(),
00033    fiPriority(prio)
00034 {
00035    TRACE((14,"TGo4UserException:TGo4UserException (TGo4TaskHandler*)", __LINE__, __FILE__));
00036    fxDescription= "!!!-- Go4 User Exception --!!!";
00037    // put potential printf arguments in text:
00038    Text_t txtbuf[TGo4Log::fguMESLEN];
00039    va_list args;
00040    va_start(args, text);
00041    vsnprintf(txtbuf, TGo4Log::fguMESLEN, text, args);
00042    va_end(args);
00043    fxMessage = txtbuf;
00044 }
00045 
00046 TGo4UserException::~TGo4UserException()
00047 {
00048  TRACE((14,"TGo4UserException:~TGo4UserException", __LINE__, __FILE__));
00049 
00050 }
00051 
00052 TGo4UserException & TGo4UserException::operator= (const TGo4UserException & right)
00053 {
00054  TRACE((14,"TGo4UserException:operator=",__LINE__, __FILE__));
00055  if (&right!=this)
00056     {
00057       TGo4RuntimeException::operator=(right); // copy base class members
00058       // put additional member copies here...
00059       fxMessage=right.fxMessage;
00060       fiPriority=right.fiPriority;
00061       return *this;
00062     }
00063   else
00064     {
00065       // copy is already source object
00066       return *this;
00067     }
00068 }
00069 
00070 TGo4UserException::TGo4UserException(const TGo4UserException &right)
00071   :TGo4RuntimeException(right)
00072 {
00073    TRACE((14,"TGo4UserException:TGo4UserException(right)", __LINE__, __FILE__));
00074    fxMessage=right.fxMessage;
00075    fiPriority=right.fiPriority;
00076 }
00077 
00078 Int_t TGo4UserException::Handle()
00079 {
00080    TRACE((12,"TGo4UserException::Handle()", __LINE__, __FILE__));
00081    TGo4Log::Message(GetPriority(),GetMessage());
00082 
00083    return 0;
00084 }
00085 
00086 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:04 2008 for Go4-v3.04-1 by  doxygen 1.4.2