From ab4c9da7ad5729e55e05f7c16c318d5edbb584c2 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sun, 4 Mar 2012 22:28:02 -0800 Subject: [PATCH] fixup ogr plugin error string output --- plugins/input/ogr/ogr_datasource.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/input/ogr/ogr_datasource.cpp b/plugins/input/ogr/ogr_datasource.cpp index 0e6035a3c..84458760d 100644 --- a/plugins/input/ogr/ogr_datasource.cpp +++ b/plugins/input/ogr/ogr_datasource.cpp @@ -214,24 +214,24 @@ void ogr_datasource::bind() const if (! layer_.is_valid()) { - std::string s("OGR Plugin: "); + std::ostringstream s("OGR Plugin: "); if (layer_by_name) { - s += "cannot find layer by name '" + *layer_by_name; + s << "cannot find layer by name '" << *layer_by_name; } else if (layer_by_index) { - s += "cannot find layer by index number '" + *layer_by_index; + s << "cannot find layer by index number '" << *layer_by_index; } else if (layer_by_sql) { - s += "cannot find layer by sql query '" + *layer_by_sql; + s << "cannot find layer by sql query '" << *layer_by_sql; } - s += "' in dataset '" + dataset_name_ + "'"; + s << "' in dataset '" << dataset_name_ << "'"; - throw datasource_exception(s); + throw datasource_exception(s.str()); } // work with real OGR layer