Skip to content
Myr

Fix nesting try/catch inside internal errors

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by William Langford · committed by William Langford · parent bda75c3 · Browse files · 2 files+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+5 added−1 removed

  • tests:+4 added−0 removed
  • other:+1 added−1 removed

2 files+5 added−1 removed

modified:src/compile.c+1 added-1 removed
1036 unmodified lines
1037 // Quite a pain just to hide jq's internal errors.1038 return gen_cond(// `if type=="object" and .__jq1039 gen_and(gen_call("_equal",1040 BLOCK(gen_lambda(gen_const(jv_string("object"))),1041 gen_lambda(gen_noop()))),1041 gen_lambda(gen_call("type", gen_noop())))),1042 BLOCK(gen_subexp(gen_const(jv_string("__jq"))),1043 gen_noop(),1044 gen_op_simple(INDEX))),1045 // `then error`
358 unmodified lines
modified:tests/jq.test+4 added
1710 unmodified lines
17111712.x - 101713{"x":13911860366432393}17141391186036643238217151716. |= try . catch .1717117181