summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common/ExcludeList.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/common/ExcludeList.cpp b/lib/common/ExcludeList.cpp
index b9f41634..edbf1a6a 100644
--- a/lib/common/ExcludeList.cpp
+++ b/lib/common/ExcludeList.cpp
@@ -194,9 +194,15 @@ void ExcludeList::AddRegexEntries(const std::string &rEntries)
#endif
// Compile
- if(::regcomp(pregex, entry.c_str(),
- REG_EXTENDED | REG_NOSUB) != 0)
+ int errcode = ::regcomp(pregex, entry.c_str(),
+ REG_EXTENDED | REG_NOSUB);
+
+ if (errcode != 0)
{
+ char buf[1024];
+ regerror(errcode, pregex, buf, sizeof(buf));
+ BOX_ERROR("Invalid regular expression: " <<
+ entry << ": " << buf);
THROW_EXCEPTION(CommonException, BadRegularExpression)
}