Skip to content

Commit 98feb92

Browse files
authored
完善错误信息
1 parent 9ae6772 commit 98feb92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

json.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ function json.decode(str)
550550
decode_item()
551551
end
552552
if string_find(statusBuf, "[^ \t\r\n]", statusPos) then
553-
decode_error "trailing garbage"
553+
decode_error(string_format("trailing garbage '%s'", string_sub(statusBuf, statusPos)))
554554
end
555555
return res
556556
end

0 commit comments

Comments
 (0)