aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/server/error.hpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--server/error.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/server/error.hpp b/server/error.hpp
new file mode 100644
index 0000000..cbfbb1e
--- /dev/null
+++ b/server/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}
+ { }
+};
+
+}