ensure valid string concatenation
This commit is contained in:
parent
d139e491c2
commit
49483fa2dd
1 changed files with 6 additions and 5 deletions
|
@ -169,11 +169,12 @@ void ogr_datasource::bind() const
|
|||
|
||||
if (!layer_)
|
||||
{
|
||||
std::string s("OGR Plugin: ");
|
||||
if (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 += "' in dataset '" + dataset_name_ + "'";
|
||||
throw datasource_exception(s);
|
||||
std::ostringstream s;
|
||||
s << "OGR Plugin: ";
|
||||
if (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 << "' in dataset '" << dataset_name_ << "'";
|
||||
throw datasource_exception(s.str());
|
||||
}
|
||||
|
||||
// initialize envelope
|
||||
|
|
Loading…
Add table
Reference in a new issue