Skip to content

Commit

Permalink
Catch exception when failing to open archive during search
Browse files Browse the repository at this point in the history
  • Loading branch information
gibber9809 committed Dec 16, 2024
1 parent cc75ffe commit a64bd6b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/core/src/clp_s/clp-s.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,12 @@ int main(int argc, char const* argv[]) {

auto archive_reader = std::make_shared<clp_s::ArchiveReader>();
for (auto const& archive_path : command_line_arguments.get_input_paths()) {
archive_reader->open(archive_path, command_line_arguments.get_network_auth());
try {
archive_reader->open(archive_path, command_line_arguments.get_network_auth());
} catch (std::exception const& e) {
SPDLOG_ERROR("Failed to open archive - {}", e.what());
return 1;
}
if (false
== search_archive(
command_line_arguments,
Expand Down

0 comments on commit a64bd6b

Please sign in to comment.