aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 40c9de4..1679da1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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");