catch error and raise UserWarning if an input plugin cannot be found during load_map() - closes #302
This commit is contained in:
parent
17acd92c43
commit
b46996ff8b
1 changed files with 10 additions and 1 deletions
|
@ -415,17 +415,26 @@ namespace mapnik
|
||||||
paramIter->first + "'");
|
paramIter->first + "'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//now we're ready to create datasource
|
//now we are ready to create datasource
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
boost::shared_ptr<datasource> ds =
|
boost::shared_ptr<datasource> ds =
|
||||||
datasource_cache::instance()->create(params);
|
datasource_cache::instance()->create(params);
|
||||||
lyr.set_datasource(ds);
|
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 )
|
catch (const mapnik::datasource_exception & ex )
|
||||||
{
|
{
|
||||||
throw config_error( ex.what() );
|
throw config_error( ex.what() );
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
//throw config_error("exception...");
|
//throw config_error("exception...");
|
||||||
|
|
Loading…
Add table
Reference in a new issue