summaryrefslogtreecommitdiff
path: root/include/mbgl/util/error.hpp
blob: 99e27f770c2dcea3b123bde3cdaa746f5ca26194 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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