Skip to content

Commit 6c6e47f

Browse files
mgreewader
authored andcommitted
add mention of --depth in error msg
1 parent 1e5e1d7 commit 6c6e47f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jv_parse.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ static void push(struct jv_parser* p, jv v) {
154154
static pfunc parse_token(struct jv_parser* p, char ch) {
155155
switch (ch) {
156156
case '[':
157-
if (p->maxdepth > 0 && p->stackpos >= p->maxdepth) return "Exceeds depth limit for parsing";
157+
if (p->maxdepth > 0 && p->stackpos >= p->maxdepth) return "Exceeds depth limit for parsing (set with --depth)";
158158
if (jv_is_valid(p->next)) return "Expected separator between values";
159159
push(p, jv_array());
160160
break;
161161

162162
case '{':
163-
if (p->maxdepth > 0 && p->stackpos >= p->maxdepth) return "Exceeds depth limit for parsing";
163+
if (p->maxdepth > 0 && p->stackpos >= p->maxdepth) return "Exceeds depth limit for parsing (set with --depth)";
164164
if (jv_is_valid(p->next)) return "Expected separator between values";
165165
push(p, jv_object());
166166
break;

0 commit comments

Comments
 (0)