Skip to content

Commit 09cb31a

Browse files
authored
Merge pull request #792 from pbalcer/uncaught-e-fs
[loader] fix potential uncaught exception
2 parents 736cfd2 + 5ee78f4 commit 09cb31a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

source/loader/ur_adapter_registry.hpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@ class AdapterRegistry {
3333
if (forceLoadedAdaptersOpt.has_value()) {
3434
for (const auto &s : forceLoadedAdaptersOpt.value()) {
3535
auto path = fs::path(s);
36-
if (fs::exists(path)) {
36+
bool exists = false;
37+
try {
38+
exists = fs::exists(path);
39+
} catch (std::exception &e) {
40+
logger::error(e.what());
41+
}
42+
43+
if (exists) {
3744
adaptersLoadPaths.emplace_back(std::vector{path});
3845
} else {
3946
logger::warning(

0 commit comments

Comments
 (0)