diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2012-10-25 17:07:16 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2012-10-25 17:07:16 +0100 |
commit | 5f6ef962097916ae2908e9190d5ba62533ae33ca (patch) | |
tree | dfc5b9dfa166b94c690c344660cbe029a935ad7d /json-glib/json-parser.c | |
parent | 1d236453b2569cb2cb5bbc80fde1c72e7a101826 (diff) | |
download | json-glib-5f6ef962097916ae2908e9190d5ba62533ae33ca.tar.gz |
parser: Show the column in the error message
For JSON parsed from data (which tends to be in a single line) the
column holds more information than the line.
Diffstat (limited to 'json-glib/json-parser.c')
-rw-r--r-- | json-glib/json-parser.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/json-glib/json-parser.c b/json-glib/json-parser.c index 55da6fb..fcfafb5 100644 --- a/json-glib/json-parser.c +++ b/json-glib/json-parser.c @@ -818,9 +818,10 @@ json_scanner_msg_handler (JsonScanner *scanner, */ g_set_error (&error, JSON_PARSER_ERROR, priv->error_code, - _("%s:%d: Parse error: %s"), - priv->is_filename ? priv->filename : "<none>", + _("%s:%d:%d: Parse error: %s"), + priv->is_filename ? priv->filename : "<data>", scanner->line, + scanner->position, message); parser->priv->last_error = error; |