| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <stdexcept> |
| 4 | |
| 5 | namespace mbgl { |
| 6 | namespace util { |
| 7 | |
| 8 | struct Exception : std::runtime_error { |
| 9 | Exception(const char *msg) : std::runtime_error(msg) {} |
| 10 | Exception(const std::string &msg) : std::runtime_error(msg) {} |
| 11 | }; |
| 12 | |
| 13 | struct SpriteImageException : Exception { |
| 14 | SpriteImageException(const char *msg) : Exception(msg) {} |
| 15 | SpriteImageException(const std::string &msg) : Exception(msg) {} |
| 16 | }; |
| 17 | |
| 18 | struct MisuseException : Exception { |
| 19 | MisuseException(const char *msg) : Exception(msg) {} |
| 20 | MisuseException(const std::string &msg) : Exception(msg) {} |
| 21 | }; |
| 22 | |
| 23 | struct StyleParseException : Exception { |
| 24 | StyleParseException(const char *msg) : Exception(msg) {} |
| 25 | StyleParseException(const std::string &msg) : Exception(msg) {} |
| 26 | }; |
| 27 | |
| 28 | struct StyleLoadException : Exception { |
| 29 | StyleLoadException(const char *msg) : Exception(msg) {} |
| 30 | StyleLoadException(const std::string &msg) : Exception(msg) {} |
| 31 | }; |
| 32 | |
| 33 | struct NotFoundException : Exception { |
| 34 | NotFoundException(const char *msg) : Exception(msg) {} |
| 35 | NotFoundException(const std::string &msg) : Exception(msg) {} |
| 36 | }; |
| 37 | |
| 38 | } // namespace util |
| 39 | } // namespace mbgl |
| 40 |
