From 16de579d7cfc2960793cbcb5e95741f22ab73768 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 22 Dec 2015 15:10:24 -0800 Subject: [core] Rationalize error handling for resource loading * Standardize on std::exception_ptr as the error representation (fixes #2854). * Don't format textual strings at the error source; pass on the constituent data via observer method parameters instead. * Use the null object pattern to simplify observer notification code. * Further refactoring for ResourceLoading tests. --- include/mbgl/util/exception.hpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'include/mbgl/util/exception.hpp') diff --git a/include/mbgl/util/exception.hpp b/include/mbgl/util/exception.hpp index 06098840a8..b2214b36b8 100644 --- a/include/mbgl/util/exception.hpp +++ b/include/mbgl/util/exception.hpp @@ -16,11 +16,6 @@ struct SpriteImageException : Exception { inline SpriteImageException(const std::string &msg) : Exception(msg) {} }; -struct GlyphRangeLoadingException : Exception { - inline GlyphRangeLoadingException(const char *msg) : Exception(msg) {} - inline GlyphRangeLoadingException(const std::string &msg) : Exception(msg) {} -}; - struct MisuseException : Exception { inline MisuseException(const char *msg) : Exception(msg) {} inline MisuseException(const std::string &msg) : Exception(msg) {} @@ -31,21 +26,6 @@ struct ShaderException : Exception { inline ShaderException(const std::string &msg) : Exception(msg) {} }; -struct SourceLoadingException : Exception { - inline SourceLoadingException(const char *msg) : Exception(msg) {} - inline SourceLoadingException(const std::string &msg) : Exception(msg) {} -}; - -struct SpriteLoadingException : Exception { - inline SpriteLoadingException(const char *msg) : Exception(msg) {} - inline SpriteLoadingException(const std::string &msg) : Exception(msg) {} -}; - -struct TileLoadingException : Exception { - inline TileLoadingException(const char *msg) : Exception(msg) {} - inline TileLoadingException(const std::string &msg) : Exception(msg) {} -}; - } // namespace util } // namespace mbgl -- cgit v1.2.1