MyGUI 3.2.0

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_Exception.h
Go to the documentation of this file.
1
6 /*
7 This file is part of MyGUI.
8
9 MyGUI is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 MyGUI is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef __MYGUI_EXCEPTION_H__
23 #define __MYGUI_EXCEPTION_H__
24
25 #include "MyGUI_Prerequest.h"
26 #include <exception>
27 #include <string>
28
29 namespace MyGUI
30 {
31
32 class MYGUI_EXPORT Exception :
33 public std::exception
34 {
35 public:
36 Exception(const std::string& _description, const std::string& _source, const char* _file, long _line);
37
38 Exception(const Exception& _rhs);
39
40 // Needed for compatibility with std::exception
41 ~Exception() throw();
42
43 Exception& operator = (const Exception& _rhs);
44
45 virtual const std::string& getFullDescription() const;
46
47 virtual const std::string& getSource() const;
48
49 virtual const std::string& getFile() const;
50
51 virtual long getLine() const;
52
53 virtual const std::string& getDescription() const;
54
55 // Override std::exception::what
56 const char* what() const throw();
57
58 protected:
59 std::string mDescription;
60 std::string mSource;
61 std::string mFile;
62 long mLine;
63 mutable std::string mFullDesc;
64 };
65
66 } // namespace MyGUI
67
68 #endif // __MYGUI_EXCEPTION_H__
MyGUI_Prerequest.h
MyGUI::Exception::mLine
long mLine
Definition: MyGUI_Exception.h:62
MyGUI::Exception::mDescription
std::string mDescription
Definition: MyGUI_Exception.h:59
MyGUI::Exception
Definition: MyGUI_Exception.h:32
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:120
MyGUI::Exception::mFullDesc
std::string mFullDesc
Definition: MyGUI_Exception.h:63
MyGUI::Exception::mFile
std::string mFile
Definition: MyGUI_Exception.h:61
MyGUI::Exception::mSource
std::string mSource
Definition: MyGUI_Exception.h:60