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