This stops hiding some really difficult to track down
problems.
Signed-off-by: Luke Kanies <[email protected]>
---
lib/puppet/util/autoload.rb | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/lib/puppet/util/autoload.rb b/lib/puppet/util/autoload.rb
index ec2f48c..6e26cb5 100644
--- a/lib/puppet/util/autoload.rb
+++ b/lib/puppet/util/autoload.rb
@@ -87,14 +87,8 @@ class Puppet::Util::Autoload
loaded name, file
return true
rescue Exception => detail
- # I have no idea what's going on here, but different versions
- # of ruby are raising different errors on missing files.
- unless detail.to_s =~ /^no such file/i
- warn "Could not autoload %s: %s" % [name, detail]
- if Puppet[:trace]
- puts detail.backtrace
- end
- end
+ puts detail.backtrace if Puppet[:trace]
+ warn "Could not autoload #{name}: #{detail}"
return named_file_is_missing(name)
end
end
@@ -124,10 +118,8 @@ class Puppet::Util::Autoload
Kernel.require file
loaded(name, file)
rescue Exception => detail
- if Puppet[:trace]
- puts detail.backtrace
- end
- warn "Could not autoload %s: %s" % [file.inspect, detail]
+ puts detail.backtrace if Puppet[:trace]
+ warn "Could not autoload #{file}: #{detail}"
end
end
end
--
1.6.1
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.