From 6c0eb32d75fbc9530921ee32c2e9a4390de00d8c Mon Sep 17 00:00:00 2001 From: zimoch Date: Wed, 16 May 2012 14:23:43 +0000 Subject: [PATCH] Print helpful message when matching string is too long --- src/RegexpConverter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RegexpConverter.cc b/src/RegexpConverter.cc index a1e017c..09bf972 100644 --- a/src/RegexpConverter.cc +++ b/src/RegexpConverter.cc @@ -110,7 +110,7 @@ scanString(const StreamFormat& fmt, const char* input, len = ovector[subexpr*2+1] - ovector[subexpr*2]; if (len >= maxlen) { if (!(fmt.flags & sign_flag)) { - debug("Matching string \"%s\" too long (%d>%d bytes)\n", + error("Regexp: Matching string \"%s\" too long (%d>%d bytes). You may want to try the + flag: \"%%+/.../\"\n", StreamBuffer(input+ovector[subexpr*2], len).expand()(), (int)len, (int)maxlen-1); return -1;