summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/handler/configuration.rb
diff options
context:
space:
mode:
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