Rescue LoadError explicitly as it doesn't inherit from StandardError
authorTom Hughes <tom@compton.nu>
Tue, 24 Mar 2015 23:13:37 +0000 (23:13 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 24 Mar 2015 23:13:37 +0000 (23:13 +0000)
cookbooks/chef/templates/default/client.rb.erb

index 92c96fe..52cbbdf 100644 (file)
@@ -44,7 +44,7 @@ begin
   exception_handlers << email_handler
   report_handlers << email_handler
 
-rescue
+rescue LoadError
 
   # Ignore errors in case required gems not installed yet