From b46996ff8bf165efd5af781697dd456c2427227f Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 13 Apr 2009 23:22:00 +0000 Subject: [PATCH] catch error and raise UserWarning if an input plugin cannot be found during load_map() - closes #302 --- src/load_map.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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...");