8 #ifndef RETDEC_EXCEPTIONS_H
9 #define RETDEC_EXCEPTIONS_H
19 class Error:
public std::runtime_error {
21 Error(
const std::string &what);
29 IoError(
const std::string &what);
53 ApiError(
int code,
const std::string &message,
54 const std::string &description =
"");
65 const std::string message;
68 const std::string description;
Exception thrown when there is a filesystem error.
Definition: exceptions.h:35
The namespace of the library.
Definition: doxygen.h:8
DecompilationError(const std::string &what)
Creates an exception.
Definition: exceptions.cpp:76
Exception thrown when there is a connection error.
Definition: exceptions.h:43
IoError(const std::string &what)
Creates an exception.
Definition: exceptions.cpp:21
Error(const std::string &what)
Creates an exception.
Definition: exceptions.cpp:15
ApiError(int code, const std::string &message, const std::string &description="")
Creates an exception.
Definition: exceptions.cpp:43
int getCode() const noexcept
Returns the error code.
Definition: exceptions.cpp:53
std::string getMessage() const
Returns a short message describing the error.
Definition: exceptions.cpp:60
FilesystemError(const std::string &what)
Creates an exception.
Definition: exceptions.cpp:27
Exception thrown when there is an I/O error.
Definition: exceptions.h:27
std::string getDescription() const
Returns a full description of the error (if any).
Definition: exceptions.cpp:69
Exception thrown when a decompilation fails.
Definition: exceptions.h:74
Base class for custom exceptions thrown by the library.
Definition: exceptions.h:19
ConnectionError(const std::string &what)
Creates an exception.
Definition: exceptions.cpp:33
Exception thrown when the API is used incorrectly.
Definition: exceptions.h:51