Skip to content

Commit d0c2e94

Browse files
author
Barnabás Domozi
committed
Do not exit if it fails to process a path from modules file
1 parent 530748b commit d0c2e94

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

parser/src/parsercontext.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <boost/filesystem/exception.hpp>
12
#include <fstream>
23

34
#include <boost/filesystem.hpp>
@@ -86,7 +87,7 @@ ParserContext::ParserContext(
8687

8788
if (!fileStream.good()) {
8889
LOG(error) << "Failed to open modules file: " << modulesFilePath;
89-
exit(1);
90+
return;
9091
}
9192

9293
LOG(info) << "Processing modules file: " << modulesFilePath;
@@ -96,9 +97,9 @@ ParserContext::ParserContext(
9697
try {
9798
const fs::path p = fs::canonical(line);
9899
moduleDirectories.push_back(p.string());
99-
} catch (...) {
100+
} catch (fs::filesystem_error& err) {
100101
LOG(error) << "Failed to process path from modules file: " << line;
101-
exit(1);
102+
LOG(error) << err.what();
102103
}
103104
}
104105
}

0 commit comments

Comments
 (0)