summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-07-14 18:41:28 +0000
committerLuke Kanies <luke@madstop.com>2005-07-14 18:41:28 +0000
commitc04b337a94f35c2c0ac7b65b6e4a941d707a69a7 (patch)
treea02eb1d5bc9df88d4eecbdd21eb154a7f0a65718
parent3c4181cb811d7ad1c87cbb69a43c4e049bd98641 (diff)
downloadpuppet-c04b337a94f35c2c0ac7b65b6e4a941d707a69a7.tar.gz
puppet-c04b337a94f35c2c0ac7b65b6e4a941d707a69a7.tar.xz
puppet-c04b337a94f35c2c0ac7b65b6e4a941d707a69a7.zip
converting debug() back to Puppet.debug()
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@391 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r--lib/puppet/transportable.rb17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/puppet/transportable.rb b/lib/puppet/transportable.rb
index 853333130..0c12a432d 100644
--- a/lib/puppet/transportable.rb
+++ b/lib/puppet/transportable.rb
@@ -85,7 +85,14 @@ module Puppet
name = name.intern
end
if type.allowedmethod(name)
- type.send(self.name,self.args)
+ Puppet.debug "Sending %s->%s(%s)" %
+ [type.name,self.name,self.args]
+ begin
+ type.send(self.name,self.args)
+ rescue => detail
+ raise "Failed to execute '%s.%s(%s)'" %
+ [type,self.name,self.args]
+ end
else
err("%s does not respond to %s" % [self.type,self.name])
end
@@ -122,7 +129,7 @@ module Puppet
raise "TransBuckets must have names"
end
unless defined? @type
- debug "TransBucket '%s' has no type" % @name
+ Puppet.debug "TransBucket '%s' has no type" % @name
end
hash = {
:name => @name,
@@ -130,12 +137,12 @@ module Puppet
}
if defined? @parameters
@parameters.each { |param,value|
- debug "Defining %s on %s of type %s" %
+ Puppet.debug "Defining %s on %s of type %s" %
[param,@name,@type]
hash[param] = value
}
else
- debug "%s has no parameters" % @name
+ Puppet.debug "%s has no parameters" % @name
end
container = Puppet::Component.new(hash)
nametable = {}
@@ -163,7 +170,7 @@ module Puppet
# don't rename; this shouldn't be possible anyway
next if var == :name
- debug "Adding %s to %s" % [var,name]
+ Puppet.debug "Adding %s to %s" % [var,name]
# override any existing values
object[var] = value
}