summaryrefslogtreecommitdiff
path: root/src/mbgl/util/error.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/util/error.hpp')
-rw-r--r--src/mbgl/util/error.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mbgl/util/error.hpp b/src/mbgl/util/error.hpp
new file mode 100644
index 0000000000..09fa8d3e21
--- /dev/null
+++ b/src/mbgl/util/error.hpp
@@ -0,0 +1,20 @@
+#ifndef MBGL_UTIL_ERROR
+#define MBGL_UTIL_ERROR
+
+#include <stdexcept>
+#include <string>
+
+namespace mbgl {
+namespace error {
+
+struct style_parse : std::exception {
+ inline style_parse(size_t offset_, const char *msg_) : offset(offset_), msg(msg_) {}
+ inline const char* what() const noexcept { return msg.c_str(); }
+ const size_t offset;
+ const std::string msg;
+};
+}
+
+}
+
+#endif \ No newline at end of file