summaryrefslogtreecommitdiff
path: root/include/mbgl/util/exception.hpp
blob: 0b4403270c7f1f978d81cf25ad55d7a1c37cf47f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef MBGL_UTIL_EXCEPTION
#define MBGL_UTIL_EXCEPTION

#include <stdexcept>

namespace mbgl {
namespace util {

struct Exception : std::runtime_error {
    inline Exception(const char *msg) : std::runtime_error(msg) {}
    inline Exception(const std::string &msg) : std::runtime_error(msg) {}
};

struct MisuseException : Exception {
    inline MisuseException(const char *msg) : Exception(msg) {}
    inline MisuseException(const std::string &msg) : Exception(msg) {}
};

struct ShaderException : Exception {
    inline ShaderException(const char *msg) : Exception(msg) {}
    inline ShaderException(const std::string &msg) : Exception(msg) {}
};

}
}

#endif