summaryrefslogtreecommitdiff
path: root/lib/ohai/dsl/plugin.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ohai/dsl/plugin.rb')
-rw-r--r--lib/ohai/dsl/plugin.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/ohai/dsl/plugin.rb b/lib/ohai/dsl/plugin.rb
index 7d7456e1..e3694ac1 100644
--- a/lib/ohai/dsl/plugin.rb
+++ b/lib/ohai/dsl/plugin.rb
@@ -180,14 +180,12 @@ module Ohai
# emulates the old plugin loading behavior
def safe_run
- begin
- self.run
- rescue Ohai::Exceptions::Error => e
- raise e
- rescue => e
- Ohai::Log.debug("Plugin #{self.name} threw #{e.inspect}")
- e.backtrace.each { |line| Ohai::Log.debug( line ) }
- end
+ run
+ rescue Ohai::Exceptions::Error => e
+ raise e
+ rescue => e
+ Ohai::Log.debug("Plugin #{name} threw #{e.inspect}")
+ e.backtrace.each { |line| Ohai::Log.debug( line ) }
end
def method_missing(name, *args)