diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-09-23 18:51:52 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-09-23 18:51:52 +0000 |
commit | f490d93daf0461f524c2d71d8b012ea090949861 (patch) | |
tree | e33807d130bd3ae9edbe8be05dc6a436e8583e20 /lib | |
parent | 0be0b2edba8b77243b5f6d9c95cc5214ccc4c76a (diff) |
Compile fix.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common/ExcludeList.cpp | 10 |
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) } |