1 #pragma once 2 3 #include <stdexcept> 4 5 namespace mbgl { 6 namespace util { 7 8 struct Exception : std::runtime_error { Exceptionmbgl::util::Exception9 Exception(const char *msg) : std::runtime_error(msg) {} Exceptionmbgl::util::Exception10 Exception(const std::string &msg) : std::runtime_error(msg) {} 11 }; 12 13 struct SpriteImageException : Exception { SpriteImageExceptionmbgl::util::SpriteImageException14 SpriteImageException(const char *msg) : Exception(msg) {} SpriteImageExceptionmbgl::util::SpriteImageException15 SpriteImageException(const std::string &msg) : Exception(msg) {} 16 }; 17 18 struct MisuseException : Exception { MisuseExceptionmbgl::util::MisuseException19 MisuseException(const char *msg) : Exception(msg) {} MisuseExceptionmbgl::util::MisuseException20 MisuseException(const std::string &msg) : Exception(msg) {} 21 }; 22 23 struct StyleParseException : Exception { StyleParseExceptionmbgl::util::StyleParseException24 StyleParseException(const char *msg) : Exception(msg) {} StyleParseExceptionmbgl::util::StyleParseException25 StyleParseException(const std::string &msg) : Exception(msg) {} 26 }; 27 28 struct StyleLoadException : Exception { StyleLoadExceptionmbgl::util::StyleLoadException29 StyleLoadException(const char *msg) : Exception(msg) {} StyleLoadExceptionmbgl::util::StyleLoadException30 StyleLoadException(const std::string &msg) : Exception(msg) {} 31 }; 32 33 struct NotFoundException : Exception { NotFoundExceptionmbgl::util::NotFoundException34 NotFoundException(const char *msg) : Exception(msg) {} NotFoundExceptionmbgl::util::NotFoundException35 NotFoundException(const std::string &msg) : Exception(msg) {} 36 }; 37 38 } // namespace util 39 } // namespace mbgl 40