00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __MYGUI_EXCEPTION_H__
00024 #define __MYGUI_EXCEPTION_H__
00025
00026 #include "MyGUI_Prerequest.h"
00027 #include <exception>
00028
00029 namespace MyGUI
00030 {
00031
00032 class MYGUI_EXPORT Exception : public std::exception
00033 {
00034 protected:
00035 std::string mDescription;
00036 std::string mSource;
00037 std::string mFile;
00038 long mLine;
00039 mutable std::string mFullDesc;
00040
00041 public:
00042 Exception(const std::string& _description, const std::string& _source, const char* _file, long _line );
00043
00044 Exception(const Exception& _rhs);
00045
00046
00047 ~Exception() throw() { }
00048
00049 void operator = (const Exception& _rhs);
00050
00051 virtual const std::string& getFullDescription() const;
00052
00053 virtual const std::string &getSource() const { return mSource; }
00054
00055 virtual const std::string &getFile() const { return mFile; }
00056
00057 virtual long getLine() const { return mLine; }
00058
00059 virtual const std::string& getDescription() const { return mDescription; }
00060
00061
00062 const char* what() const throw() { return getFullDescription().c_str(); }
00063
00064 };
00065
00066 }
00067
00068 #endif // __MYGUI_EXCEPTION_H__