raster.input - throw if reader can't be created

This commit is contained in:
artemp 2015-10-02 12:47:57 +01:00
parent 1bccca9ff8
commit cbb40d0662

View file

@ -87,6 +87,7 @@ raster_datasource::raster_datasource(parameters const& params)
else //bounding box from image_reader
{
std::unique_ptr<image_reader> reader(mapnik::get_image_reader(*file));
if (!reader) throw datasource_exception("Raster Plugin: failed to create reader for " + *file);
auto bbox = reader->bounding_box();
if (bbox)
{