+ throw image_reader_exception if we can't read tiff file
+ catch image_reader_exceptions in raster.input + re-throw in bind()
This commit is contained in:
parent
c906dcea02
commit
7191d56a16
3 changed files with 15 additions and 5 deletions
|
@ -111,9 +111,15 @@ void raster_datasource::bind() const
|
|||
#endif
|
||||
}
|
||||
}
|
||||
catch (mapnik::image_reader_exception const& ex)
|
||||
{
|
||||
std::cerr << "Raster Plugin: image reader exception caught:" << ex.what() << std::endl;
|
||||
throw;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "Raster Plugin: exception caught" << std::endl;
|
||||
throw;
|
||||
}
|
||||
|
||||
is_bound_ = true;
|
||||
|
|
|
@ -102,6 +102,10 @@ feature_ptr raster_featureset<LookupPolicy>::next()
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (mapnik::image_reader_exception const& ex)
|
||||
{
|
||||
std::cerr << "Raster Plugin: image reader exception caught:" << ex.what() << std::endl;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "Raster Plugin: exception caught" << std::endl;
|
||||
|
|
|
@ -97,7 +97,7 @@ void tiff_reader::init()
|
|||
// TODO: error handling
|
||||
TIFFSetWarningHandler(0);
|
||||
TIFF* tif = load_if_exists(file_name_);
|
||||
if (!tif) return;
|
||||
if (!tif) throw image_reader_exception ("Can't load tiff file");
|
||||
|
||||
char msg[1024];
|
||||
|
||||
|
|
Loading…
Reference in a new issue