fixup ogr plugin error string output
This commit is contained in:
parent
ad86e9aebc
commit
ab4c9da7ad
1 changed files with 6 additions and 6 deletions
|
@ -214,24 +214,24 @@ void ogr_datasource::bind() const
|
||||||
|
|
||||||
if (! layer_.is_valid())
|
if (! layer_.is_valid())
|
||||||
{
|
{
|
||||||
std::string s("OGR Plugin: ");
|
std::ostringstream s("OGR Plugin: ");
|
||||||
|
|
||||||
if (layer_by_name)
|
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)
|
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)
|
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
|
// work with real OGR layer
|
||||||
|
|
Loading…
Reference in a new issue