From 0cea94a82ef277092897a03446f6e6fccba90d53 Mon Sep 17 00:00:00 2001 From: Felix Frank Date: Tue, 29 Mar 2016 01:59:54 +0200 Subject: catch StandardError rather than the gratuitous Exception --- lib/facter/facter_dot_d.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/facter/facter_dot_d.rb') 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 -- cgit v1.2.3