X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fcore%2FException.hxx;fp=src%2Fcore%2FException.hxx;h=d1b0e674d9202088c730316f8c770ad33feeba43;hp=0000000000000000000000000000000000000000;hb=6ef4f50fd9cb11d8f83885b1898f761ff8c025ae;hpb=9cf22741bcee8b33aa0e4a77d97b361dec7074d7 diff --git a/src/core/Exception.hxx b/src/core/Exception.hxx new file mode 100644 index 0000000..d1b0e67 --- /dev/null +++ b/src/core/Exception.hxx @@ -0,0 +1,27 @@ +#ifndef INCLUDE__Exception_hxx_ +#define INCLUDE__Exception_hxx_ + +#include + +class Exception { +public: + Exception () {} + // Exception (const Exception&) noexcept; + // exception& operator= (const exception&) noexcept; + virtual ~Exception() {} + virtual const char* what() const noexcept = 0; +}; + +class BinaryNotSupported { +public: + BinaryNotSupported() + : message("This binary is not supported by this Disassembler") {} + BinaryNotSupported(const std::string& message) + : message("This binary is not supported by this Disassembler (" + message + ")") {} + const char* what() const {return message.c_str();} + +private: + std::string message; +}; + +#endif /* INCLUDE__Exception_hxx_ */