Skip to content

Commit

Permalink
v.info: Add vector name to no db connection message (#2434)
Browse files Browse the repository at this point in the history
The error message about missing database connection for a given layer does not include vector name which may not be clear when scripting or when getting the errors from underlying calls to v.info.
  • Loading branch information
wenzeslaus committed Feb 15, 2023
1 parent b59a047 commit 29cd640
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vector/v.info/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ void print_columns(const struct Map_info *Map, const char *input_opt,
field_opt);

if ((fi = Vect_get_field2(Map, field_opt)) == NULL)
G_fatal_error(_("Database connection not defined for layer <%s>"),
field_opt);
G_fatal_error(
_("Database connection not defined for layer <%s> of <%s>"),
field_opt, input_opt);
driver = db_start_driver(fi->driver);
if (driver == NULL)
G_fatal_error(_("Unable to open driver <%s>"), fi->driver);
Expand Down

0 comments on commit 29cd640

Please sign in to comment.