diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-11-13 19:49:18 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-11-13 19:49:18 +0100 |
commit | ffcb9954a9ab4c0ddbc9458be67f9c40ab13ae7a (patch) | |
tree | 7bd4bec08c994a9a317059ef7aa3e1244a5e41fa /src | |
parent | a811ec6990daf3628f48feeae2746cba3dfa428a (diff) |
Print the regex that failed to compile
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -367,7 +367,8 @@ pattern_comp(u8view_t pat) if (op.re == nullptr) { /* TODO: Print which regex failed to compile */ pcre2_bitch_and_die( - ec, "failed to compile regex at byte offset %zu", eoff); + ec, "failed to compile regex %s%.*s%s at byte offset %zu", + lquot, SV_PRI_ARGS(re), rquot, eoff); } if ((ec = pcre2_jit_compile(op.re, PCRE2_JIT_COMPLETE)) != 0) pcre2_bitch_and_die(ec, "failed to JIT compile regex"); |