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