ensure all exceptions are caught in Image ctor

This commit is contained in:
artemp
2014-11-19 16:17:52 +01:00
parent 759a5e65cf
commit f7e813238d

View File

@@ -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;
}
}
}