Skip to content

Commit

Permalink
Catch Exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-kolb committed Sep 3, 2024
1 parent fda201c commit f1d2623
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/profiles/vendor.erb
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
<%
begin
addon = Profiles::ServiceVendor.find_by(:key => rt['name'].downcase)
rescue Mongoid::Errors::DocumentNotFound
rescue Exception
addon = rt
end
%>
Expand Down
4 changes: 2 additions & 2 deletions tasks/db.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def technologies
isolation: e['isolation'],
dev_model: e['dev_model']
)
rescue Mongoid::Errors::DocumentNotFound
rescue Exception
puts "WARN: No profile found for '#{e['vendor']}' while trying to update technology data"
end
end
Expand All @@ -75,7 +75,7 @@ def twitter
Profiles::Vendor.find_by(name: e['vendor']).update(
twitter: e['twitter']
)
rescue Mongoid::Errors::DocumentNotFound
rescue Exception
puts 'WARN: Vendor is missing for twitter update'
end

Expand Down

0 comments on commit f1d2623

Please sign in to comment.