mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
+ better not to use errno (via perror) for std::iostreams
(it works with gcc and friends but non-standard)
This commit is contained in:
parent
edd5148aa4
commit
024ebfdfe3
@ -33,7 +33,6 @@
|
||||
|
||||
// STL
|
||||
#include <iomanip>
|
||||
#include <cstdio>
|
||||
|
||||
namespace mapnik {
|
||||
|
||||
@ -334,7 +333,10 @@ void metawriter_json::start(metawriter_property_map const& properties)
|
||||
void metawriter_json::write_header()
|
||||
{
|
||||
f_.open(filename_.c_str(), std::fstream::out | std::fstream::trunc);
|
||||
if (f_.fail()) perror((std::string("Metawriter JSON: Failed to open file ") + filename_).c_str());
|
||||
if (f_.fail())
|
||||
{
|
||||
MAPNIK_LOG_DEBUG(metawriter) << "metawriter_json: Failed to open file " << filename_;
|
||||
}
|
||||
set_stream(&f_);
|
||||
metawriter_json_stream::write_header();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user