00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "TGo4CreateException.h"
00015
00016 #include "Riostream.h"
00017
00018 #include "TGo4Log.h"
00019 #include "TGo4Thread.h"
00020 #include "TGo4ThreadHandler.h"
00021 #include "TGo4Runnable.h"
00022
00023 TGo4CreateException::TGo4CreateException(const TGo4CreateException &right)
00024 :TGo4ThreadException(right)
00025 {
00026 TRACE((14,"TGo4CreateException::TGo4CreateException() copy constructor",__LINE__, __FILE__));
00027 }
00028
00029 TGo4CreateException::TGo4CreateException (TGo4Runnable* runnable, const char* threadname)
00030 :TGo4ThreadException(runnable,threadname)
00031 {
00032 TRACE((14,"TGo4CreateException::TGo4CreateException(TGo4Runnable*, const char*) constructor",__LINE__, __FILE__));
00033 fxDescription= "!!!-- Go4 Create Exception --!!!";
00034 }
00035
00036
00037 TGo4CreateException::~TGo4CreateException()
00038 {
00039 TRACE((14,"TGo4CreateException::~TGo4CreateException() destructor",__LINE__, __FILE__));
00040 }
00041
00042
00043 TGo4CreateException & TGo4CreateException::operator=(const TGo4CreateException &right)
00044 {
00045 TRACE((14,"TGo4CreateException::operator=",__LINE__, __FILE__));
00046 if (&right!=this)
00047 {
00048 TRACE((13,"TGo4CreateException::operator= processing copy",__LINE__, __FILE__));
00049 TGo4ThreadException::operator=(right);
00050
00051 return *this;
00052 }
00053 else
00054 {
00055
00056 TRACE((13,"TGo4CreateException::operator= source and destination objects are identical",__LINE__, __FILE__));
00057 return *this;
00058 }
00059 }
00060
00061 Int_t TGo4CreateException::Handle ()
00062 {
00063 TRACE((14,"TGo4CreateException::Handle()",__LINE__, __FILE__));
00064 cout << "\t This is the TGo4CreateException::Handler"<<endl;
00065 Int_t rev=-1;
00066 if(GetThreadName()==0)
00067
00068 {
00069 TRACE((13,"TGo4CreateException::Handle() -- creating thread of runnable",__LINE__, __FILE__));
00070 rev=fxRunnable->GetThread()->Create();
00071 }
00072 else
00073
00074 {
00075 TRACE((13,"TGo4CreateException::Handle() -- creating thread by name",__LINE__, __FILE__));
00076 rev=fxThreadHandler->Create(GetThreadName());
00077 }
00078
00079 return rev;
00080 }
00081
00082
00083
00084