Include layer name in error message from AGG renderer
This commit is contained in:
parent
049b7b2fe4
commit
ec2f03a6e0
2 changed files with 10 additions and 1 deletions
|
@ -232,6 +232,7 @@ void feature_style_processor<Processor>::apply_to_layer(layer const& lay, Proces
|
|||
int buffer_size,
|
||||
std::set<std::string>& names)
|
||||
{
|
||||
try {
|
||||
std::vector<std::string> const& style_names = lay.styles();
|
||||
|
||||
unsigned int num_styles = style_names.size();
|
||||
|
@ -548,6 +549,13 @@ void feature_style_processor<Processor>::apply_to_layer(layer const& lay, Proces
|
|||
#endif
|
||||
|
||||
p.end_layer_processing(lay);
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
std::ostringstream m;
|
||||
m << lay.name() << ": " << e.what();
|
||||
throw std::runtime_error(m.str().c_str());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -107,7 +107,8 @@ public:
|
|||
|
||||
if (! result || (PQresultStatus(result) != PGRES_TUPLES_OK))
|
||||
{
|
||||
std::string err_msg = status();
|
||||
std::string err_msg = "Postgis Plugin: ";
|
||||
err_msg += status();
|
||||
err_msg += "\nFull sql was: '";
|
||||
err_msg += sql;
|
||||
err_msg += "'\n";
|
||||
|
|
Loading…
Reference in a new issue