diff options
author | Bryan Jen <bryan.jen@gmail.com> | 2016-03-29 09:13:46 -0700 |
---|---|---|
committer | Bryan Jen <bryan.jen@gmail.com> | 2016-03-29 09:13:46 -0700 |
commit | c5486aba6284664ae87a65beaa011211c70ea03e (patch) | |
tree | 5c1a4ffc818b9a96bda68fdc07d0a4a81cbc01db /lib/facter | |
parent | b63849c7865e4191e9df5a7651c16c072facee3d (diff) | |
parent | 0cea94a82ef277092897a03446f6e6fccba90d53 (diff) |
Merge pull request #586 from ffrank/dont_catch_exception
catch StandardError rather than the gratuitous Exception
Diffstat (limited to 'lib/facter')
-rw-r--r-- | lib/facter/facter_dot_d.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/facter/facter_dot_d.rb b/lib/facter/facter_dot_d.rb index d85940d..5c5fb1f 100644 --- a/lib/facter/facter_dot_d.rb +++ b/lib/facter/facter_dot_d.rb @@ -48,7 +48,7 @@ class Facter::Util::DotD end end end - rescue Exception => e + rescue StandardError => e Facter.warn("Failed to handle #{file} as text facts: #{e.class}: #{e}") end @@ -65,7 +65,7 @@ class Facter::Util::DotD setcode { v } end end - rescue Exception => e + rescue StandardError => e Facter.warn("Failed to handle #{file} as json facts: #{e.class}: #{e}") end @@ -77,7 +77,7 @@ class Facter::Util::DotD setcode { v } end end - rescue Exception => e + rescue StandardError => e Facter.warn("Failed to handle #{file} as yaml facts: #{e.class}: #{e}") end @@ -106,7 +106,7 @@ class Facter::Util::DotD end end end - rescue Exception => e + rescue StandardError => e Facter.warn("Failed to handle #{file} as script facts: #{e.class}: #{e}") Facter.debug(e.backtrace.join("\n\t")) end |