diff --git a/lib/puma/configuration.rb b/lib/puma/configuration.rb index 838e61731a..eeb31a0cb7 100644 --- a/lib/puma/configuration.rb +++ b/lib/puma/configuration.rb @@ -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