diff options
author | artemp <artem@mapnik.org> | 2014-11-19 16:17:52 +0100 |
---|---|---|
committer | Leith Bade <leith@mapbox.com> | 2014-11-28 00:15:04 +1100 |
commit | a2a303a1d1cbe98fe7ea708b2a652ea933c46ac7 (patch) | |
tree | a008a9670cd0b21226e29003facde55b8bfceec8 /platform/default/image.cpp | |
parent | fcebd44571965acc091283881b1e3f9be78a3d7c (diff) | |
download | qtlocation-mapboxgl-a2a303a1d1cbe98fe7ea708b2a652ea933c46ac7.tar.gz |
ensure all exceptions are caught in Image ctor
Diffstat (limited to 'platform/default/image.cpp')
-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 bc9e720069..5922d6033f 100644 --- a/platform/default/image.cpp +++ b/platform/default/image.cpp @@ -85,12 +85,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; + } } } |