summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/handler/configuration.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-10-03 17:31:57 -0500
committerLuke Kanies <luke@madstop.com>2007-10-03 17:31:57 -0500
commit5d50ca790e7f752e07da84197b52ff84d2dcfdb4 (patch)
treee2a6da756a53347ed5d33de7f89040222279a449 /lib/puppet/network/handler/configuration.rb
parentb727a95aa4b72ce057653101cf1f50fa49c4b0a8 (diff)
downloadpuppet-5d50ca790e7f752e07da84197b52ff84d2dcfdb4.tar.gz
puppet-5d50ca790e7f752e07da84197b52ff84d2dcfdb4.tar.xz
puppet-5d50ca790e7f752e07da84197b52ff84d2dcfdb4.zip
Fixing #814 -- when files are missing, the exceptions should
now be more reasonable.
Diffstat (limited to 'lib/puppet/network/handler/configuration.rb')
-rw-r--r--lib/puppet/network/handler/configuration.rb17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/puppet/network/handler/configuration.rb b/lib/puppet/network/handler/configuration.rb
index 2df1b3ab4..353693bdc 100644
--- a/lib/puppet/network/handler/configuration.rb
+++ b/lib/puppet/network/handler/configuration.rb
@@ -107,16 +107,13 @@ class Puppet::Network::Handler
benchmark(level, "Compiled configuration for %s" % node.name) do
begin
config = interpreter.compile(node)
- rescue Puppet::Error => detail
- if Puppet[:trace]
- puts detail.backtrace
- end
- unless local?
- Puppet.err detail.to_s
- end
- raise XMLRPC::FaultException.new(
- 1, detail.to_s
- )
+ rescue => detail
+ # If we're local, then we leave it to the local system
+ # to handle error reporting, but otherwise we do it here
+ # so the interpreter doesn't need to know if the parser
+ # is local or not.
+ Puppet.err(detail.to_s) unless local?
+ raise
end
end