Skip to content

Commit

Permalink
Catch Exception for config file checks
Browse files Browse the repository at this point in the history
  • Loading branch information
gdb committed Apr 12, 2015
1 parent 33d3171 commit a877649
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/einhorn.rb
Expand Up @@ -389,8 +389,12 @@ def self.can_safely_reload?

begin
Einhorn::ConfigFile.check_config_file!
rescue => e
Einhorn.log_info("Looks like a broken config file: #{e}")
rescue Exception => e
# Ideally we'd catch something a bit less broad, but we'd need
# to know what YAML syntax errors to catch for each support Ruby
# version. This is a bit of a hammer, but seems like one that
# works.
Einhorn.log_info("Looks like a broken config file: #{e} (#{e.class})")
return false
end

Expand Down

0 comments on commit a877649

Please sign in to comment.