catch error and raise UserWarning if an input plugin cannot be found during load_map() - closes #302

This commit is contained in:
Dane Springmeyer 2009-04-13 23:22:00 +00:00
parent 17acd92c43
commit b46996ff8b

View file

@ -415,17 +415,26 @@ namespace mapnik
paramIter->first + "'");
}
}
//now we're ready to create datasource
//now we are ready to create datasource
try
{
boost::shared_ptr<datasource> ds =
datasource_cache::instance()->create(params);
lyr.set_datasource(ds);
}
// catch problem at datasource registration
catch (const mapnik::config_error & ex )
{
throw config_error( ex.what() );
}
// catch problem at the datasource creation
catch (const mapnik::datasource_exception & ex )
{
throw config_error( ex.what() );
}
catch (...)
{
//throw config_error("exception...");