Skip to content

Commit

Permalink
@wip Catch exceptions in run_hooks mehtod
Browse files Browse the repository at this point in the history
  • Loading branch information
andrykonchin committed Mar 7, 2020
1 parent 8001792 commit 529adbd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/puma/configuration.rb
Expand Up @@ -276,7 +276,16 @@ def load_plugin(name)
end

def run_hooks(key, arg)
@options.all_of(key).each { |b| b.call arg }
@options.all_of(key).each do |b|
begin
b.call arg
rescue => e
# TODO: logging
# TODO: write tests - unit and integration
puts "WARNING hook #{key} failed with exception"
puts e.full_message
end
end
end

def self.temp_path
Expand Down

0 comments on commit 529adbd

Please sign in to comment.