Exception.cppGo to the documentation of this file.00001 00006 /* 00007 Copyright (C) 2007-2008 Anders Hedstrom 00008 00009 This library is made available under the terms of the GNU GPL. 00010 00011 If you would like to use this library in a closed-source application, 00012 a separate license agreement is available. For information about 00013 the closed-source license agreement for the C++ sockets library, 00014 please visit http://www.alhem.net/Sockets/license.html and/or 00015 email license@alhem.net. 00016 00017 This program is free software; you can redistribute it and/or 00018 modify it under the terms of the GNU General Public License 00019 as published by the Free Software Foundation; either version 2 00020 of the License, or (at your option) any later version. 00021 00022 This program is distributed in the hope that it will be useful, 00023 but WITHOUT ANY WARRANTY; without even the implied warranty of 00024 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00025 GNU General Public License for more details. 00026 00027 You should have received a copy of the GNU General Public License 00028 along with this program; if not, write to the Free Software 00029 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00030 */ 00031 #ifdef _MSC_VER 00032 #pragma warning(disable:4786) 00033 #endif 00034 #include "Exception.h" 00035 #include "Utility.h" 00036 00037 #ifdef SOCKETS_NAMESPACE 00038 namespace SOCKETS_NAMESPACE { 00039 #endif 00040 00041 00042 00043 Exception::Exception(const std::string& description) : m_description(description) 00044 , m_stack(Utility::Stack()) 00045 { 00046 } 00047 00048 00049 const std::string Exception::ToString() const 00050 { 00051 return m_description; 00052 } 00053 00054 00055 const std::string Exception::Stack() const 00056 { 00057 return m_stack; 00058 } 00059 00060 00061 #ifdef SOCKETS_NAMESPACE 00062 } // namespace SOCKETS_NAMESPACE { 00063 #endif 00064 |
1.4.4
