[Box Backup-commit] COMMIT r1896 - box/chris/general/lib/common
boxbackup-dev at fluffy.co.uk
boxbackup-dev at fluffy.co.uk
Wed Oct 17 13:57:11 BST 2007
Author: chris
Date: 2007-10-17 13:57:11 +0100 (Wed, 17 Oct 2007)
New Revision: 1896
Modified:
box/chris/general/lib/common/ExcludeList.cpp
Log:
Compile fix. (merges [1859])
Modified: box/chris/general/lib/common/ExcludeList.cpp
===================================================================
--- box/chris/general/lib/common/ExcludeList.cpp 2007-10-17 12:56:38 UTC (rev 1895)
+++ box/chris/general/lib/common/ExcludeList.cpp 2007-10-17 12:57:11 UTC (rev 1896)
@@ -194,9 +194,15 @@
#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)
}
More information about the Boxbackup-commit
mailing list