/[escript]/branches/windows_from_1431_trunk/esysUtils/src/EsysException.cpp
ViewVC logotype

Diff of /branches/windows_from_1431_trunk/esysUtils/src/EsysException.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1447 by phornby, Thu Feb 28 10:47:57 2008 UTC revision 1448 by phornby, Thu Feb 28 12:31:04 2008 UTC
# Line 25  std::ostream &operator<<(std::ostream &o Line 25  std::ostream &operator<<(std::ostream &o
25  }  }
26    
27  EsysException::EsysException():  EsysException::EsysException():
28  exception(),  Parent(),
29  m_reason()  m_reason()
30  {  {
31    updateMessage();      updateMessage();  
32  }  }
33    
34  EsysException::EsysException(const std::string &exceptionReason):  EsysException::EsysException(const std::string &exceptionReason):
35  exception(),  Parent(),
36  m_reason(exceptionReason)  m_reason(exceptionReason)
37  {  {
38    updateMessage();      updateMessage();  
39  }  }
40    
41  // Copy Constructor.  // Copy Constructor.
42  EsysException::EsysException(const EsysException &inException):  EsysException::EsysException(const EsysException &other):
43  exception(inException),  Parent(other),
44  m_reason(inException.m_reason)  m_reason(other.m_reason)
45  {  {
46    *this=inException;    updateMessage();  
47  }  }
48    
49  EsysException::EsysException( const char *cStr ):  EsysException::EsysException( const char *cStr ):
50  exception(),  Parent(),
51  m_reason(cStr)  m_reason(cStr)
52  {  {
53    updateMessage();      updateMessage();  
# Line 61  const std::string & EsysException::excep Line 61  const std::string & EsysException::excep
61    return exceptionNameValue;    return exceptionNameValue;
62  }  }
63    
 //  
 // Overloaded assignment operator.  
 EsysException& EsysException::operator=(const EsysException &inException)  
 {  
   if (this != &inException)  
   {  
     //  
     // call the base class operator=  
     // win32 refactor: parent class operator= shares pointer the result is  
     // all classes try to free the same pointer, dies on windows badly.  
     // exception::operator=(inException);  
     //  
     // copy the message buffer into this EsysException  
     m_reason = inException.m_reason;  
     updateMessage();  
   }  
   return *this;  
 }  

Legend:
Removed from v.1447  
changed lines
  Added in v.1448

  ViewVC Help
Powered by ViewVC 1.1.26