MyGUI: MyGUI_Exception.h Source File

MyGUI 3.4.3

MyGUI_Exception.h
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#ifndef MYGUI_EXCEPTION_H_
8#define MYGUI_EXCEPTION_H_
9
10#include "MyGUI_Prerequest.h"
11#include <exception>
12#include <string>
13
14#if MYGUI_COMPILER == MYGUI_COMPILER_MSVC
15 // disable: warning C4275: non dll-interface class '***' used as base for dll-interface clas '***'
16 #pragma warning(push)
17 #pragma warning(disable : 4275)
18#endif
19
20namespace MyGUI
21{
22
23 class MYGUI_EXPORT Exception : public std::exception
24 {
25 public:
26 Exception(std::string _description, std::string _source, std::string _file, long _line);
27
28 virtual const std::string& getFullDescription() const;
29
30 virtual const std::string& getSource() const;
31
32 virtual const std::string& getFile() const;
33
34 virtual long getLine() const;
35
36 virtual const std::string& getDescription() const;
37
38 const char* what() const noexcept override;
39
40 protected:
41 std::string mDescription;
42 std::string mSource;
43 std::string mFile;
44 long mLine;
45 mutable std::string mFullDesc;
46 };
47
48} // namespace MyGUI
49
50#if MYGUI_COMPILER == MYGUI_COMPILER_MSVC
51 #pragma warning(pop)
52#endif
53
54#endif // MYGUI_EXCEPTION_H_
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI::Exception::Exception
Exception(std::string _description, std::string _source, std::string _file, long _line)
Definition MyGUI_Exception.cpp:16
MyGUI::Exception::mFullDesc
std::string mFullDesc
Definition MyGUI_Exception.h:45
MyGUI::Exception::getLine
virtual long getLine() const
Definition MyGUI_Exception.cpp:60
MyGUI::Exception::mSource
std::string mSource
Definition MyGUI_Exception.h:42
MyGUI::Exception::getSource
virtual const std::string & getSource() const
Definition MyGUI_Exception.cpp:50
MyGUI::Exception::what
const char * what() const noexcept override
Definition MyGUI_Exception.cpp:71
MyGUI::Exception::mDescription
std::string mDescription
Definition MyGUI_Exception.h:41
MyGUI::Exception::getFullDescription
virtual const std::string & getFullDescription() const
Definition MyGUI_Exception.cpp:24
MyGUI::Exception::getFile
virtual const std::string & getFile() const
Definition MyGUI_Exception.cpp:55
MyGUI::Exception::getDescription
virtual const std::string & getDescription() const
Definition MyGUI_Exception.cpp:65
MyGUI::Exception::mFile
std::string mFile
Definition MyGUI_Exception.h:43
MyGUI::Exception::mLine
long mLine
Definition MyGUI_Exception.h:44
MyGUI
Definition MyGUI_ActionController.h:15