diff --git a/src/load_map.cpp b/src/load_map.cpp index faf72c426..63dd08db7 100644 --- a/src/load_map.cpp +++ b/src/load_map.cpp @@ -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 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...");