00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "TGo4TerminateException.h"
00017
00018 #include "TThread.h"
00019
00020 #include "TGo4Log.h"
00021 #include "TGo4ThreadManager.h"
00022 #include "TGo4Runnable.h"
00023
00024 TGo4TerminateException::TGo4TerminateException (TGo4Runnable* runnable)
00025 {
00026 TRACE((14,"TGo4TerminateException::TGo4TerminateException (TGo4Runnable*)", __LINE__, __FILE__));
00027 fxDescription= "!!!-- Go4 Terminate Exception --!!!";
00028 fxThreadManager=runnable->GetThreadManager();
00029 }
00030
00031 TGo4TerminateException::TGo4TerminateException (TGo4ThreadManager* man)
00032 {
00033 TRACE((14,"TGo4TerminateException::TGo4TerminateException (TGo4ThreadManager*)", __LINE__, __FILE__));
00034 fxDescription= "!!!-- Go4 Terminate Exception --!!!";
00035 fxThreadManager=man;
00036 }
00037
00038 TGo4TerminateException::TGo4TerminateException(const TGo4TerminateException &right)
00039 :TGo4ControlException(right)
00040 {
00041 TRACE((14,"TGo4TerminateException::TGo4TerminateException (const TGo4TerminateException*)", __LINE__, __FILE__));
00042 fxThreadManager=right.fxThreadManager;
00043 }
00044
00045 TGo4TerminateException & TGo4TerminateException::operator=(const TGo4TerminateException &right)
00046 {
00047 TRACE((14,"TGo4TerminateException::operator=(const TGo4TerminateException*)", __LINE__, __FILE__));
00048 if (&right!=this)
00049 {
00050 ;
00051 TGo4ControlException::operator=(right);
00052
00053 fxThreadManager=right.fxThreadManager;
00054 return *this;
00055 }
00056 else
00057 {
00058
00059 ;
00060 return *this;
00061 }
00062 }
00063
00064 TGo4TerminateException::~TGo4TerminateException()
00065 {
00066 TRACE((14,"TGo4TerminateException::~TGo4TerminateException()", __LINE__, __FILE__));
00067
00068 }
00069
00070 Int_t TGo4TerminateException::Handle ()
00071 {
00072 TRACE((12,"TGo4TaskHandlerAbortException::Handle()", __LINE__, __FILE__));
00073
00074 TGo4Log::Debug("\n Terminate Exception default Handle: Terminating Thread Manager %s ... \n",
00075 fxThreadManager->GetName());
00076 fxThreadManager->Terminate();
00077 TThread::CancelPoint();
00078 return 0;
00079
00080 }
00081
00082