Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
OpenKarto
source
OpenKarto
Exception.h
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
#pragma once
19
20
#ifndef __OpenKarto_Exception_h__
21
#define __OpenKarto_Exception_h__
22
23
#include <
OpenKarto/String.h
>
24
25
namespace
karto
26
{
27
29
30
34
38
class
KARTO_EXPORT
Exception
39
{
40
public
:
45
Exception
(
const
char
* pMessage);
46
52
Exception
(
const
String
& rMessage =
"Karto Exception"
,
kt_int32s
errorCode = 0);
53
57
Exception
(
const
Exception
& rOther);
58
62
virtual
~
Exception
();
63
64
public
:
68
Exception
& operator=(
const
Exception
& rException);
69
70
public
:
75
const
String
& GetErrorMessage()
const
;
76
81
kt_int32s
GetErrorCode();
82
83
public
:
87
friend
KARTO_FORCEINLINE
std::ostream& operator << (std::ostream& rStream,
Exception
& rException)
88
{
89
rStream <<
"Karto Fatal Error: "
<< std::endl;
90
rStream <<
" ==> error code: "
<< rException.
GetErrorCode
() << std::endl;
91
rStream <<
" ==> error message: "
<< rException.
GetErrorMessage
() << std::endl;
92
return
rStream;
93
}
94
95
private
:
96
String
m_Message
;
97
kt_int32s
m_ErrorCode
;
98
};
// class Exception
99
101
}
102
103
#endif // __OpenKarto_Exception_h__
karto::String
Definition:
String.h:52
karto::Exception::m_Message
String m_Message
Definition:
Exception.h:96
KARTO_EXPORT
#define KARTO_EXPORT
Definition:
Macros.h:78
karto::Exception::GetErrorMessage
const String & GetErrorMessage() const
Definition:
Exception.cpp:56
KARTO_FORCEINLINE
#define KARTO_FORCEINLINE
Definition:
Macros.h:56
karto::Exception::GetErrorCode
kt_int32s GetErrorCode()
Definition:
Exception.cpp:61
kt_int32s
int32_t kt_int32s
Definition:
Types.h:106
karto::Exception::m_ErrorCode
kt_int32s m_ErrorCode
Definition:
Exception.h:97
karto::Exception
Definition:
Exception.h:38
karto
Definition:
Any.cpp:20
String.h
nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Tue Nov 7 2017 06:02:36