diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-22 15:10:24 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-12-23 12:50:42 -0800 |
commit | 16de579d7cfc2960793cbcb5e95741f22ab73768 (patch) | |
tree | b4c3b7651f605e3d3dd61b469f61036bd2c4dcc3 /src/mbgl/map/map_context.hpp | |
parent | 7bd4745cf10c504a4899a37016e87bce45e51472 (diff) | |
download | qtlocation-mapboxgl-16de579d7cfc2960793cbcb5e95741f22ab73768.tar.gz |
[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.
Diffstat (limited to 'src/mbgl/map/map_context.hpp')
-rw-r--r-- | src/mbgl/map/map_context.hpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mbgl/map/map_context.hpp b/src/mbgl/map/map_context.hpp index 24459f270a..012da785c9 100644 --- a/src/mbgl/map/map_context.hpp +++ b/src/mbgl/map/map_context.hpp @@ -65,14 +65,12 @@ public: void onLowMemory(); void cleanup(); - - // Style::Observer implementation. - void onTileDataChanged() override; - void onResourceLoadingFailed(std::exception_ptr error) override; - void dumpDebugLogs() const; private: + void onResourceLoaded() override; + void onResourceError(std::exception_ptr) override; + // Update the state indicated by the accumulated Update flags, then render. void update(); |