diff options
Diffstat (limited to 'lib/common/ExcludeList.cpp')
-rw-r--r-- | lib/common/ExcludeList.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/common/ExcludeList.cpp b/lib/common/ExcludeList.cpp index 213c4f8e..3f9f69ee 100644 --- a/lib/common/ExcludeList.cpp +++ b/lib/common/ExcludeList.cpp @@ -10,9 +10,9 @@ #include "Box.h" #ifdef HAVE_REGEX_SUPPORT - #ifdef HAVE_PCREPOSIX_H + #if defined HAVE_PCREPOSIX_H #include <pcreposix.h> - #else + #elif defined HAVE_REGEX_H #include <regex.h> #endif #define EXCLUDELIST_IMPLEMENTATION_REGEX_T_DEFINED @@ -139,9 +139,10 @@ void ExcludeList::AddDefiniteEntries(const std::string &rEntries) if (entry.size() > 0 && entry[entry.size() - 1] == DIRECTORY_SEPARATOR_ASCHAR) { - BOX_WARNING("Exclude entry ends in path " - "separator, will never match: " - << entry); + BOX_LOG_CATEGORY(Log::WARNING, + ConfigurationVerify::VERIFY_ERROR, + "Exclude entry ends in path separator, " + "will never match: " << entry); } mDefinite.insert(entry); @@ -198,9 +199,9 @@ void ExcludeList::AddRegexEntries(const std::string &rEntries) { char buf[1024]; regerror(errcode, pregex, buf, sizeof(buf)); - BOX_ERROR("Invalid regular expression: " << + THROW_EXCEPTION_MESSAGE(CommonException, BadRegularExpression, + "Invalid regular expression: " << entry << ": " << buf); - THROW_EXCEPTION(CommonException, BadRegularExpression) } // Store in list of regular expressions |