Exception.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2011, SRI International (R)
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #include <OpenKarto/Exception.h>
19 
20 namespace karto
21 {
22 
23  Exception::Exception(const char* pMessage)
24  : m_Message(pMessage)
25  , m_ErrorCode(0)
26  {
27  }
28 
29  Exception::Exception(const String& rMessage, kt_int32s errorCode)
30  : m_Message(rMessage)
31  , m_ErrorCode(errorCode)
32  {
33  }
34 
35  Exception::Exception(const Exception& rException)
36  : m_Message(rException.m_Message)
37  , m_ErrorCode(rException.m_ErrorCode)
38  {
39  }
40 
42  {
43  }
44 
46  {
47  if (&rException != this)
48  {
49  m_Message = rException.m_Message;
50  m_ErrorCode = rException.m_ErrorCode;
51  }
52 
53  return *this;
54  }
55 
57  {
58  return m_Message;
59  }
60 
62  {
63  return m_ErrorCode;
64  }
65 
66 }
virtual ~Exception()
Definition: Exception.cpp:41
String m_Message
Definition: Exception.h:96
const String & GetErrorMessage() const
Definition: Exception.cpp:56
kt_int32s GetErrorCode()
Definition: Exception.cpp:61
int32_t kt_int32s
Definition: Types.h:106
kt_int32s m_ErrorCode
Definition: Exception.h:97
Definition: Any.cpp:20
Exception & operator=(const Exception &rException)
Definition: Exception.cpp:45
Exception(const char *pMessage)
Definition: Exception.cpp:23


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Thu Jun 6 2019 19:20:24