diff options
author | artemp <artem@mapnik.org> | 2014-11-19 16:17:52 +0100 |
---|---|---|
committer | artemp <artem@mapnik.org> | 2014-11-19 16:17:52 +0100 |
commit | f7e813238da85270a974e4a045242af2dda0fda0 (patch) | |
tree | 09c7a577465733e30bafb205d371901284fb2733 /platform | |
parent | 759a5e65cf853d679650339e26fef25141ab1901 (diff) | |
download | qtlocation-mapboxgl-f7e813238da85270a974e4a045242af2dda0fda0.tar.gz |
ensure all exceptions are caught in Image ctor
Diffstat (limited to 'platform')
-rw-r--r-- | platform/default/image.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/platform/default/image.cpp b/platform/default/image.cpp index 96d01ab718..9a76ef33f6 100644 --- a/platform/default/image.cpp +++ b/platform/default/image.cpp @@ -84,12 +84,19 @@ Image::Image(std::string const& data) } catch (image_reader_exception const& ex) { - fprintf(stderr, "ImageReader: %s\n", ex.what()); + fprintf(stderr, "Image: %s\n", ex.what()); img.reset(); width = 0; height = 0; } + catch (...) // catch the rest + { + fprintf(stderr, "Image: exception in constructor"); + img.reset(); + width = 0; + height = 0; + } } } |