Add doc repo as submodule
[frida/frida.git] / src / core / Exception.hxx
1 #ifndef INCLUDE__Exception_hxx_
2 #define INCLUDE__Exception_hxx_
3
4 #include <string>
5
6 class Exception {
7 public:
8 Exception () {}
9 // Exception (const Exception&) noexcept;
10 // exception& operator= (const exception&) noexcept;
11 virtual ~Exception() {}
12 virtual const char* what() const noexcept = 0;
13 };
14
15 class BinaryNotSupported {
16 public:
17 BinaryNotSupported()
18 : message("This binary is not supported by this Disassembler") {}
19 BinaryNotSupported(const std::string& message)
20 : message("This binary is not supported by this Disassembler (" + message + ")") {}
21 const char* what() const {return message.c_str();}
22
23 private:
24 std::string message;
25 };
26
27 #endif /* INCLUDE__Exception_hxx_ */