diff options
Diffstat (limited to 'server/common/error.hpp')
-rw-r--r-- | server/common/error.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/server/common/error.hpp b/server/common/error.hpp new file mode 100644 index 0000000..cbfbb1e --- /dev/null +++ b/server/common/error.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include <stdexcept> +#include <string> + +namespace math::server { + +class Error : public std::runtime_error { +public: + explicit Error(const std::string& what) + : std::runtime_error{"server error: " + what} + { } +}; + +} |