36 #ifndef CTCLEXCEPTION_H //Required for current class 37 #define CTCLEXCEPTION_H 42 #ifndef TCLINTERPRETEROBJECT_H 43 #include "TCLInterpreterObject.h" 46 #ifndef TCLINTERPRETER_H 47 #include "TCLInterpreter.h" 51 #include "TCLResult.h" 56 #include "Exception.h" 60 #ifndef TCLPLUSTYPES_H 61 #include <libtclplusdatatypes.h> 67 TCLPLUS::Int_t m_nReason;
74 std::string m_ResultText;
79 TCLPLUS::Int_t am_nReason,
80 const char* pString) :
85 m_ResultText = std::string(Tcl_GetStringResult(am_rInterpreter.getInterpreter()));
88 TCLPLUS::Int_t am_nReason,
89 const std::string& rString) :
94 m_ResultText = std::string(Tcl_GetStringResult(am_rInterpreter.getInterpreter()));
104 m_nReason = aCTCLException.m_nReason;
105 m_ResultText = aCTCLException.m_ResultText;
112 if (
this == &aCTCLException)
return *
this;
113 CTCLInterpreterObject::operator= (aCTCLException);
114 CException::operator= (aCTCLException);
116 if(
this != &aCTCLException) {
117 m_nReason = aCTCLException.m_nReason;
118 m_ResultText = aCTCLException.m_ResultText;
127 (CTCLInterpreterObject::operator== (aCTCLException)) &&
128 (CException::operator== (aCTCLException)) &&
129 (m_nReason == aCTCLException.m_nReason)
137 TCLPLUS::Int_t getReason()
const 151 Bind(am_rInterpreter);
153 void setReason (TCLPLUS::Int_t am_nReason)
155 m_nReason = am_nReason;
160 void AddErrorInfo (
const char* pMessage) ;
161 void AddErrorInfo(
const std::string& rMessage) {
162 AddErrorInfo(rMessage.c_str());
164 void AddErrorInfo(
const CTCLString& rMessage) {
165 AddErrorInfo((
const char*)(rMessage));
168 void SetErrorCode (
const char* pMessage,
169 const char* pMnemonic=
"???",
170 const char* pFacility=
"TCL",
171 const char* pSeverity=
"FATAL") ;
172 void SetErrorCode(
const std::string rMessage,
173 const std::string &rMnemonic=std::string(
"???"),
174 const std::string &rFacility=std::string(
"TCL"),
175 const std::string &rSeverity=std::string(
"FATAL")) {
176 SetErrorCode(rMessage.c_str(), rMnemonic.c_str(),
177 rFacility.c_str(), rSeverity.c_str());
183 virtual const char* ReasonText ()
const;
184 virtual TCLPLUS::Int_t ReasonCode ()
const ;
Definition: TCLException.h:65
std::string getTraceback()
Definition: TCLException.cpp:166
Definition: TCLString.h:28
Definition: TCLInterpreterObject.h:46
Definition: TCLInterpreter.h:59
Definition: TCLResult.h:55
Definition: Exception.h:41