Skip to content

Commit

Permalink
[loader] fix potential uncaught exception
Browse files Browse the repository at this point in the history
  • Loading branch information
pbalcer committed Aug 9, 2023
1 parent 404afa8 commit 5ee78f4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion source/loader/ur_adapter_registry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ class AdapterRegistry {
if (forceLoadedAdaptersOpt.has_value()) {
for (const auto &s : forceLoadedAdaptersOpt.value()) {
auto path = fs::path(s);
if (fs::exists(path)) {
bool exists = false;
try {
exists = fs::exists(path);
} catch (std::exception &e) {
logger::error(e.what());
}

if (exists) {
adaptersLoadPaths.emplace_back(std::vector{path});
} else {
logger::warning(
Expand Down

0 comments on commit 5ee78f4

Please sign in to comment.