diff options
| author | Thomas Knudsen <busstoptaktik@users.noreply.github.com> | 2017-11-15 09:31:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-15 09:31:23 +0100 |
| commit | f08a7c0cf9dc3ed017a224e196e9d251da8dc97c (patch) | |
| tree | 8277f9c6f344a228bb3dc0eaa7f34375d2736e1f /src | |
| parent | cff58ea23f20306d7cc0410b808f0d46d73e6978 (diff) | |
| parent | 4ef2f40bcddb10c7cea3b6c2a6442f84f103ffd7 (diff) | |
| download | PROJ-f08a7c0cf9dc3ed017a224e196e9d251da8dc97c.tar.gz PROJ-f08a7c0cf9dc3ed017a224e196e9d251da8dc97c.zip | |
Merge pull request #667 from busstoptaktik/gie-misleading-errmsg
Give definition and def'n line no. in "Invalid operation" message
Diffstat (limited to 'src')
| -rw-r--r-- | src/gie.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -150,12 +150,13 @@ typedef struct { int op_ok, op_ko; int total_ok, total_ko; int grand_ok, grand_ko; + size_t operation_lineno; double tolerance; char *curr_file; FILE *fout; } gie_ctx; -gie_ctx T = {{""}, 0, {{0,0,0,0}}, {{0,0,0,0}}, {{0,0,0,0}}, {{0,0,0,0}}, PJ_FWD, 1, 0, 0,0,0,0,0,0,0, 0.0005, 0, 0}; +gie_ctx T = {{""}, 0, {{0,0,0,0}}, {{0,0,0,0}}, {{0,0,0,0}}, {{0,0,0,0}}, PJ_FWD, 1, 0, 0,0,0,0,0,0,0,0, 0.0005, 0, 0}; OPTARGS *o; @@ -438,6 +439,8 @@ static int operation (char *args) { int i, j, n; T.op_id++; + T.operation_lineno = lineno; + /* compactify the args, so we can fit more info on a line in verbose mode */ n = (int) strlen (args); for (i = j = 0; i < n; ) { @@ -658,7 +661,8 @@ static int expect (char *args) { expect_failure = 1; if (0==T.P && !expect_failure) { - errmsg(3, "Invalid operation definition!\n %s\n", args); + banner (T.operation); + errmsg(3, "%sInvalid operation definition in line no. %d\n", delim, (int) T.operation_lineno); return another_failure (); } |
