libpressio 0.93.0
Loading...
Searching...
No Matches
errorable.h
Go to the documentation of this file.
1#ifndef LIBPRESSIO_ERRORS_H
2#define LIBPRESSIO_ERRORS_H
3#include <string>
4
14 public:
15
19 const char* error_msg() const;
23 int error_code() const;
24
25 protected:
32 int set_error(int code, std::string const& msg);
33
38
39 private:
40 struct {
41 int code;
42 std::string msg;
43 } error = {0, ""};
44};
45
46#endif /* end of include guard: LIBPRESSIO_ERRORS_H */
Definition: errorable.h:13
const char * error_msg() const
int error_code() const
int set_error(int code, std::string const &msg)