diff options
author | Luke Kanies <luke@madstop.com> | 2007-10-03 17:31:57 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-10-03 17:31:57 -0500 |
commit | 5d50ca790e7f752e07da84197b52ff84d2dcfdb4 (patch) | |
tree | e2a6da756a53347ed5d33de7f89040222279a449 /lib/puppet/network/handler | |
parent | b727a95aa4b72ce057653101cf1f50fa49c4b0a8 (diff) | |
download | puppet-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')
-rw-r--r-- | lib/puppet/network/handler/configuration.rb | 17 | ||||
-rw-r--r-- | lib/puppet/network/handler/master.rb | 7 |
2 files changed, 8 insertions, 16 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 diff --git a/lib/puppet/network/handler/master.rb b/lib/puppet/network/handler/master.rb index 030950c61..25c4318b8 100644 --- a/lib/puppet/network/handler/master.rb +++ b/lib/puppet/network/handler/master.rb @@ -77,12 +77,7 @@ class Puppet::Network::Handler Puppet::Node::Facts.new(client, facts).save # And get the configuration from the config handler - begin - config = config_handler.configuration(client) - rescue => detail - puts detail.backtrace - raise - end + config = config_handler.configuration(client) return translate(config.extract) end |