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