lib/icu/Win32: throw exception on error

This commit is contained in:
Max Kellermann
2016-04-13 11:51:01 +02:00
parent e228144159
commit b9f535cd49
6 changed files with 72 additions and 40 deletions

View File

@@ -30,6 +30,8 @@
#include "system/Error.hxx"
#include "Log.hxx"
#include <stdexcept>
#include <assert.h>
#include <string.h>
@@ -78,9 +80,13 @@ ExcludeList::Check(Path name_fs) const
}
}
for (const auto &i : patterns)
if (i.Check(NarrowPath(name_fs).c_str()))
return true;
for (const auto &i : patterns) {
try {
if (i.Check(NarrowPath(name_fs).c_str()))
return true;
} catch (const std::runtime_error &) {
}
}
#else
/* not implemented */
(void)name_fs;