00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef PATHFIND_ERROR_H
00011 #define PATHFIND_ERROR_H
00012
00013 #include <exception>
00014 #include <string>
00015 #include <vector>
00016
00017
00018
00019 namespace PathFind
00020 {
00021 using namespace std;
00022
00023
00024 class Error
00025 : public exception
00026 {
00027 public:
00028 Error()
00029 { }
00030
00031 Error(const string& what)
00032 : m_message(what)
00033 { }
00034
00035 ~Error() throw();
00036
00037 void setMessage(const string& message)
00038 {
00039 m_message = message;
00040 }
00041
00042 const char* what() const throw()
00043 {
00044 return m_message.c_str();
00045 }
00046
00047 private:
00048 string m_message;
00049 };
00050 }
00051
00052
00053
00054 #endif