#pragma once #include #include #include using std::string; namespace dbc { class Error { public: const string message; Error(string m) : message{m} {} Error(const char *m) : message{m} {} }; class CheckError : public Error {}; class SentinelError : public Error {}; class PreCondError : public Error {}; class PostCondError : public Error {}; void log(const string &message); void sentinel(const string &message); void pre(const string &message, bool test); void pre(const string &message, std::function tester); void post(const string &message, bool test); void post(const string &message, std::function tester); void check(bool test, const string &message); }