[json-glib] parser: Show the column in the error message
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] parser: Show the column in the error message
- Date: Thu, 25 Oct 2012 17:15:37 +0000 (UTC)
commit 5f6ef962097916ae2908e9190d5ba62533ae33ca
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Oct 25 17:07:16 2012 +0100
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.
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]