aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-11-12 10:02:20 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-11-12 10:02:20 +0100
commit57a3159d5c441837607866fea848075055e03c89 (patch)
treeb75e87adf8adc9ceb01ea70b6906f1b400e1418f /src/main.c
parent23905302b2e9f85135b062b12b20c65a413994b9 (diff)
Fix the display of PCRE2 error messages
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 0a3e391..72cc89c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -360,11 +360,12 @@ pattern_comp(u8view_t pat)
size_t eoff;
op.re = pcre2_compile(re.p, re.len, reopts, &ec, &eoff, nullptr);
if (op.re == nullptr) {
+ /* TODO: Print which regex failed to compile */
pcre2_bitch_and_die(
- ec, "failed to compile regex at byte offset %zu: %s", eoff);
+ ec, "failed to compile regex at byte offset %zu", eoff);
}
if ((ec = pcre2_jit_compile(op.re, PCRE2_JIT_COMPLETE)) != 0)
- pcre2_bitch_and_die(ec, "failed to JIT compile regex: %s");
+ pcre2_bitch_and_die(ec, "failed to JIT compile regex");
#if DEBUG
op.free_me = true;
#endif