aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/client/error.hpp
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-11-30 01:38:08 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-12-01 05:23:11 +0300
commit90bd600c5025ede4db99122f13dfb07b27de46ae (patch)
tree0b581b43e5fcb54114c6c373352ed6ab5fcd61dc /client/error.hpp
downloadmath-server-90bd600c5025ede4db99122f13dfb07b27de46ae.tar.gz
math-server-90bd600c5025ede4db99122f13dfb07b27de46ae.zip
initial commit
Diffstat (limited to 'client/error.hpp')
-rw-r--r--client/error.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/client/error.hpp b/client/error.hpp
new file mode 100644
index 0000000..98e1305
--- /dev/null
+++ b/client/error.hpp
@@ -0,0 +1,15 @@
+#pragma once
+
+#include <stdexcept>
+#include <string>
+
+namespace math::client {
+
+class Error : public std::runtime_error {
+public:
+ explicit Error(const std::string& what)
+ : std::runtime_error{"client error: " + what}
+ { }
+};
+
+}