00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "TGo4TerminateException.h"
00017
00018 #include "Go4ThreadManager/TGo4ThreadManager.h"
00019 #include "Go4ThreadManager/TGo4Runnable.h"
00020 #include "Go4Log/TGo4Log.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
00030 TGo4TerminateException::TGo4TerminateException (TGo4ThreadManager* man)
00031 {
00032 TRACE((14,"TGo4TerminateException::TGo4TerminateException (TGo4ThreadManager*)", __LINE__, __FILE__));
00033 fxDescription= "!!!-- Go4 Terminate Exception --!!!";
00034 fxThreadManager=man;
00035
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
00046
00047 TGo4TerminateException & TGo4TerminateException::operator=(const TGo4TerminateException &right)
00048 {
00049 TRACE((14,"TGo4TerminateException::operator=(const TGo4TerminateException*)", __LINE__, __FILE__));
00050 if (&right!=this)
00051 {
00052 ;
00053 TGo4ControlException::operator=(right);
00054
00055 fxThreadManager=right.fxThreadManager;
00056 return *this;
00057 }
00058 else
00059 {
00060
00061 ;
00062 return *this;
00063 }
00064
00065
00066 }
00067
00068 TGo4TerminateException::~TGo4TerminateException()
00069 {
00070 TRACE((14,"TGo4TerminateException::~TGo4TerminateException()", __LINE__, __FILE__));
00071
00072 }
00073
00074
00075
00076
00077 Int_t TGo4TerminateException::Handle ()
00078 {
00079 TRACE((12,"TGo4TaskHandlerAbortException::Handle()", __LINE__, __FILE__));
00080
00081 TGo4Log::Debug("\n Terminate Exception default Handle: Terminating Thread Manager %s ... \n",
00082 fxThreadManager->GetName());
00083 fxThreadManager->Terminate();
00084 TThread::CancelPoint();
00085 return 0;
00086
00087 }
00088
00089
00090
00091
00092
00093
00094
00095
00096