From 9b3ef53338a470cae7f5c1aa4efebd6f9766246c Mon Sep 17 00:00:00 2001 From: Lucio Asnaghi Date: Mon, 29 Nov 2010 09:15:43 +0000 Subject: [PATCH] - improved error reporting in shape plugin --- plugins/input/shape/shape.cpp | 4 ++-- plugins/input/shape/shape_featureset.cpp | 6 +++--- plugins/input/shape/shape_index_featureset.cpp | 8 ++++---- plugins/input/shape/shape_io.cpp | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/input/shape/shape.cpp b/plugins/input/shape/shape.cpp index f201e4bc3..6aa407d16 100644 --- a/plugins/input/shape/shape.cpp +++ b/plugins/input/shape/shape.cpp @@ -123,12 +123,12 @@ void shape_datasource::bind() const } catch (datasource_exception& ex) { - std::clog<::shape_featureset(const filterT& filter, { std::ostringstream s; - s << "Shape Plugin: error no attribute by the name of '" << *pos << "'" - << ", available attributes are:"; + s << "error no attribute by the name of '" << *pos << "'" + << ", available attributes are:"; for (int i=0;i::shape_index_featureset(const filterT& filter, { std::ostringstream s; - s << "Shape Plugin: error no attribute by the name of '" << *pos << "'" - << ", available attributes are:"; + s << "error no attribute by the name of '" << *pos << "'" + << ", available attributes are:"; for (int i=0;i::next() } catch (...) { - std::clog << "Shape Plugin: exception caught..." << std::endl; + std::clog << "Shape Plugin: error processing attributes" << std::endl; } ++pos; } diff --git a/plugins/input/shape/shape_io.cpp b/plugins/input/shape/shape_io.cpp index 7095b44e6..a8ba76fca 100644 --- a/plugins/input/shape/shape_io.cpp +++ b/plugins/input/shape/shape_io.cpp @@ -49,14 +49,14 @@ shape_io::shape_io(const std::string& shape_name) { if (!boost::filesystem::exists(shape_name + INDEX)) { - throw datasource_exception("Shape Plugin: Warning - Could not open index: '" + shape_name + INDEX + "' does not exist"); + throw datasource_exception("Shape Plugin: could not open index: '" + shape_name + INDEX + "' does not exist"); } index_= boost::shared_ptr(new shape_file(shape_name + INDEX)); } catch (...) { - std::cerr << "Shape Plugin: Warning - Could not open index: '" + shape_name + INDEX + "'" << std::endl; + std::cerr << "Shape Plugin: warning - could not open index: '" + shape_name + INDEX + "'" << std::endl; } }