mirror of
https://github.com/mapnik/mapnik.git
synced 2026-02-01 17:36:36 +00:00
throw if we cannot detect image extension instead of failing silently
This commit is contained in:
parent
19e52c0136
commit
9520f58c5a
@ -384,6 +384,7 @@ void save_to_file(T const& image, std::string const& filename)
|
||||
{
|
||||
save_to_file<T>(image, filename, *type);
|
||||
}
|
||||
else throw ImageWriterException("Could not write file to " + filename );
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@ -394,6 +395,7 @@ void save_to_file(T const& image, std::string const& filename, rgba_palette cons
|
||||
{
|
||||
save_to_file<T>(image, filename, *type, palette);
|
||||
}
|
||||
else throw ImageWriterException("Could not write file to " + filename );
|
||||
}
|
||||
|
||||
#if defined(HAVE_CAIRO)
|
||||
@ -405,6 +407,7 @@ void save_to_cairo_file(mapnik::Map const& map, std::string const& filename, dou
|
||||
{
|
||||
save_to_cairo_file(map,filename,*type,scale_factor);
|
||||
}
|
||||
else throw ImageWriterException("Could not write file to " + filename );
|
||||
}
|
||||
|
||||
void save_to_cairo_file(mapnik::Map const& map,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user