MyGUI 3.5.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// disable: warning C4275: non dll-interface class '***' used as base for dll-interface clas '***'
16
17namespace MyGUI
18{
19
20 class MYGUI_EXPORT Exception : public std::exception
21 {
22 public:
23 Exception(std::string _description, std::string _source, std::string _file, long _line);
24
25 virtual const std::string& getFullDescription() const;
26
27 virtual const std::string& getSource() const;
28
29 virtual const std::string& getFile() const;
30
31 virtual long getLine() const;
32
33 virtual const std::string& getDescription() const;
34
35 const char* what() const noexcept override;
36
37 protected:
38 std::string mDescription;
39 std::string mSource;
40 std::string mFile;
41 long mLine;
42 mutable std::string mFullDesc;
43 };
44
45} // namespace MyGUI
46
48
49#endif // MYGUI_EXCEPTION_H_
#define MYGUI_SUPPRESS_MSVC(disabledWarning)
#define MYGUI_UNSUPPRESS_MSVC()
#define MYGUI_EXPORT