only warn about missing index file in debug mode

This commit is contained in:
Dane Springmeyer 2011-01-31 23:43:50 +00:00
parent cf5811ff3c
commit 4b076272fe

View file

@ -50,16 +50,13 @@ shape_io::shape_io(const std::string& shape_name, bool open_index)
try try
{ {
if (!boost::filesystem::exists(shape_name + INDEX))
{
throw datasource_exception("Shape Plugin: could not open index: '" + shape_name + INDEX + "' does not exist");
}
index_= boost::shared_ptr<shape_file>(new shape_file(shape_name + INDEX)); index_= boost::shared_ptr<shape_file>(new shape_file(shape_name + INDEX));
} }
catch (...) catch (...)
{ {
std::cerr << "Shape Plugin: warning - could not open index: '" + shape_name + INDEX + "'" << std::endl; #ifdef MAPNIK_DEBUG
std::clog << "Shape Plugin: warning - could not open index: '" + shape_name + INDEX + "'" << std::endl;
#endif
} }
} }
} }