From cbb40d0662c5555aadc10d96e7d0998fd713a1f8 Mon Sep 17 00:00:00 2001 From: artemp Date: Fri, 2 Oct 2015 12:47:57 +0100 Subject: [PATCH] raster.input - throw if reader can't be created --- plugins/input/raster/raster_datasource.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/input/raster/raster_datasource.cpp b/plugins/input/raster/raster_datasource.cpp index 96f59387d..4d8b5f99a 100644 --- a/plugins/input/raster/raster_datasource.cpp +++ b/plugins/input/raster/raster_datasource.cpp @@ -87,6 +87,7 @@ raster_datasource::raster_datasource(parameters const& params) else //bounding box from image_reader { std::unique_ptr 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) {