00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "TGo4EventSourceException.h"
00017
00018 #include "TGo4ControlException.h"
00019 #include "TGo4EventSource.h"
00020 #include "TGo4Log.h"
00021
00022 TGo4EventSourceException::TGo4EventSourceException (TGo4EventSource* eventsource)
00023 : fxEventSource(0), fiCreateStatus(0), fiEventStatus(0)
00024 {
00025 TRACE((16,"TGo4EventSourceException::TGo4EventSourceException (TGo4EventSource*)", __LINE__, __FILE__));
00026 fxDescription= "!!!-- Go4 EventSource Exception --!!!";
00027 if(eventsource)
00028 {
00029 fxEventSource=eventsource;
00030 fxErrMess=eventsource->GetErrMess();
00031 fxSourceName=eventsource->GetName();
00032 fxSourceClass=eventsource->ClassName();
00033 fiCreateStatus=eventsource->GetCreateStatus();
00034 fiEventStatus=eventsource->GetEventStatus();
00035 }
00036 }
00037
00038
00039 TGo4EventSourceException::TGo4EventSourceException(const TGo4EventSourceException &right)
00040 :TGo4RuntimeException(right)
00041 {
00042 TRACE((16,"TGo4EventSourceException::TGo4EventSourceException(right)", __LINE__, __FILE__)); ;
00043 fxEventSource=right.fxEventSource;
00044 fxErrMess=right.fxErrMess;
00045 fxSourceName=right.fxSourceName;
00046 fxSourceClass=right.fxSourceClass;
00047 fiCreateStatus=right.fiCreateStatus;
00048 fiEventStatus=right.fiEventStatus;
00049 }
00050
00051 TGo4EventSourceException & TGo4EventSourceException::operator= (const TGo4EventSourceException & right)
00052 {
00053 TRACE((16,"TGo4EventSourceException::operator=",__LINE__, __FILE__));
00054 if (&right!=this)
00055 {
00056 TGo4RuntimeException::operator=(right);
00057
00058 fxEventSource=right.fxEventSource;
00059 fxErrMess=right.fxErrMess;
00060 fxSourceName=right.fxSourceName;
00061 fxSourceClass=right.fxSourceClass;
00062 fiCreateStatus=right.fiCreateStatus;
00063 fiEventStatus=right.fiEventStatus;
00064 return *this;
00065 }
00066 else
00067 {
00068
00069 return *this;
00070 }
00071 }
00072
00073 TGo4EventSourceException::~TGo4EventSourceException()
00074 {
00075 TRACE((16,"TGo4EventSourceException::~TGo4EventSourceException", __LINE__, __FILE__));
00076
00077 }
00078
00079 Int_t TGo4EventSourceException::Handle()
00080 {
00081 TRACE((12,"TGo4EventSourceException::Handle()", __LINE__, __FILE__));
00082
00083 TGo4Log::Debug("%s \n %s of name %s: \n\tCreateStatus: %d \n\tEventStatus:%d, \n\t%s",
00084 What(),
00085 GetSourceClass(), GetSourceName(),
00086 GetCreateStatus(), GetEventStatus(),GetErrMess());
00087
00088 return 0;
00089 }
00090
00091
00092