Exception.cpp
Upload User: dzyhzl
Upload Date: 2019-04-29
Package Size: 56270k
Code Size: 1k
Development Platform:

C/C++

  1. #include "Exception.h"
  2. /*
  3.  * namespace OnlineGameLib::Win32
  4.  */
  5. namespace OnlineGameLib {
  6. namespace Win32 {
  7. /*
  8.  * CException
  9.  */
  10. CException::CException( const _tstring &where, const _tstring &message )
  11.    :  m_where(where), m_message(message)
  12. {
  13. }
  14. _tstring CException::GetWhere() const 
  15.    return m_where; 
  16. }
  17. _tstring CException::GetMessage() const 
  18.    return m_message; 
  19. }
  20. void CException::MessageBox( HWND hWnd /* = NULL */ ) const 
  21.    /*
  22.     * call to unqualified virtual function
  23. */
  24.    ::MessageBox( hWnd, GetMessage().c_str(), GetWhere().c_str(), MB_ICONSTOP );
  25. }
  26. } // End of namespace OnlineGameLib
  27. } // End of namespace Win32