[Box Backup-commit] COMMIT r1859 - box/trunk/lib/common
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Sun, 23 Sep 2007 19:51:52 +0100
Author: chris
Date: 2007-09-23 19:51:52 +0100 (Sun, 23 Sep 2007)
New Revision: 1859
Modified:
box/trunk/lib/common/ExcludeList.cpp
Log:
Compile fix.
Modified: box/trunk/lib/common/ExcludeList.cpp
===================================================================
--- box/trunk/lib/common/ExcludeList.cpp 2007-09-23 09:54:16 UTC (rev 1858)
+++ box/trunk/lib/common/ExcludeList.cpp 2007-09-23 18:51:52 UTC (rev 1859)
@@ -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)
}