Skip to content

Commit

Permalink
fix diff error exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Jan 15, 2025
1 parent 3299cdb commit 96d7d75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/ontologies_linked_data/models/ontology_submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def self.copy_file_repository(acronym, submissionId, src, filename = nil)
name = filename.nil? ? File.basename(File.new(src).path) : File.basename(filename)
# THIS LOGGER IS JUST FOR DEBUG - remove after NCBO-795 is closed
logger = Logger.new(Dir.pwd + "/create_permissions.log")
if not Dir.exist? path_to_repo
unless Dir.exist? path_to_repo
FileUtils.mkdir_p path_to_repo
logger.debug("Dir created #{path_to_repo} | #{"%o" % File.stat(path_to_repo).mode} | umask: #{File.umask}") # NCBO-795
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def generate_diff(logger, diff_tool)
@submission.save
logger.info("Diff generated successfully for #{@submission.id}")
logger.flush
rescue StoreError => e
rescue Exception => e
logger.error("Diff process for #{@submission.id} failed - #{e.class}: #{e.message}")
logger.flush
raise e
Expand All @@ -82,5 +82,3 @@ def generate_diff(logger, diff_tool)
end
end
end


0 comments on commit 96d7d75

Please sign in to comment.