Skip to content

Commit

Permalink
if file doesn't exist, capture and log error
Browse files Browse the repository at this point in the history
  • Loading branch information
bkiahstroud committed Apr 20, 2024
1 parent e43449e commit 2d09bca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/services/ams/missing_instantiations_locator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ def create_subsets_from_merged_map(num_processes: 4)
if File.exist?(WORKING_DIR.join(set_path, xml_filename))
logger.debug "#{xml_filename} already exists in #{File.basename(set_path)}"
else
FileUtils.cp(WORKING_DIR.join(importer_dir, xml_filename), WORKING_DIR.join(set_path, xml_filename))
begin
FileUtils.cp(WORKING_DIR.join(importer_dir, xml_filename), WORKING_DIR.join(set_path, xml_filename))
rescue => e
logger.error "#{e.class} - (#{File.basename(set_path)}/#{xml_filename}) - #{e.message}"
end
end
progressbar.increment
end
Expand Down

0 comments on commit 2d09bca

Please sign in to comment.