Skip to content

Commit fbd3bfa

Browse files
committed
Check that properties can be loaded in osmp2glsq-gen
1 parent 02673cd commit fbd3bfa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/gen/osm2pgsql-gen.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,11 @@ int main(int argc, char *argv[])
730730
}
731731

732732
properties_t properties{connection_params, middle_dbschema};
733-
properties.load();
733+
if (!properties.load()) {
734+
throw std::runtime_error{
735+
"Did not find table 'osm2pgsql_properties' in database. "
736+
"Database too old? Wrong schema?"};
737+
}
734738

735739
if (style.empty()) {
736740
style = properties.get_string("style", "");

0 commit comments

Comments
 (0)