Skip to content
Snippets Groups Projects
Unverified Commit f33ef4e3 authored by Dmitry Kalinkin's avatar Dmitry Kalinkin
Browse files

Glob: issue warnings on Directory errors

The current implementation HandleGlobImpl with throw fatal errors for
all Glob::MessageType other than cyclicRecursion. This will need to be
addressed in cmake.
parent 9a3f9799
No related branches found
No related tags found
No related merge requests found
...@@ -182,7 +182,13 @@ bool Glob::RecurseDirectory(std::string::size_type start, ...@@ -182,7 +182,13 @@ bool Glob::RecurseDirectory(std::string::size_type start,
const std::string& dir, GlobMessages* messages) const std::string& dir, GlobMessages* messages)
{ {
kwsys::Directory d; kwsys::Directory d;
if (!d.Load(dir)) { std::string errorMessage;
if (!d.Load(dir, &errorMessage)) {
if (!errorMessage.empty()) {
messages->push_back(Message(Glob::warning,
"Error listing directory '" + dir +
"'! Reason: '" + errorMessage + "'"));
}
return true; return true;
} }
unsigned long cc; unsigned long cc;
......
...@@ -28,6 +28,7 @@ public: ...@@ -28,6 +28,7 @@ public:
enum MessageType enum MessageType
{ {
error, error,
warning,
cyclicRecursion cyclicRecursion
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment