summaryrefslogtreecommitdiff
path: root/ext/json/ext/parser
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2009-10-19 23:48:56 +0200
committerFlorian Frank <flori@ping.de>2009-10-19 23:48:56 +0200
commitf5ff4bdc724a85516e50d6439bfd08ed71608953 (patch)
tree5de4205c8f459442751ca24ae1ab98961714184d /ext/json/ext/parser
parenta6eff774542df29892b6bd7e6b08d93322f9055d (diff)
downloadjson-f5ff4bdc724a85516e50d6439bfd08ed71608953.tar.gz
nicer error messages
Diffstat (limited to 'ext/json/ext/parser')
-rw-r--r--ext/json/ext/parser/unicode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/json/ext/parser/unicode.c b/ext/json/ext/parser/unicode.c
index 80e5c6f..6bd29e2 100644
--- a/ext/json/ext/parser/unicode.c
+++ b/ext/json/ext/parser/unicode.c
@@ -105,7 +105,7 @@ char *JSON_convert_UTF16_to_UTF8 (
} else if (flags == strictConversion) { /* it's an unpaired high surrogate */
ruby_xfree(tmp);
rb_raise(rb_path2class("JSON::ParserError"),
- "source sequence is illegal/malformed near %s", source);
+ "\\uXXXX is illegal/malformed utf-16 near %s", source);
}
} else { /* We don't have the 16 bits following the high surrogate. */
ruby_xfree(tmp);
@@ -118,7 +118,7 @@ char *JSON_convert_UTF16_to_UTF8 (
if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) {
ruby_xfree(tmp);
rb_raise(rb_path2class("JSON::ParserError"),
- "source sequence is illegal/malformed near %s", source);
+ "\\uXXXX is illegal/malformed utf-16 near %s", source);
}
}
/* Figure out how many bytes the result will require */