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