From 5d50ca790e7f752e07da84197b52ff84d2dcfdb4 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 3 Oct 2007 17:31:57 -0500 Subject: Fixing #814 -- when files are missing, the exceptions should now be more reasonable. --- lib/puppet/network/handler/configuration.rb | 17 +++++++---------- lib/puppet/network/handler/master.rb | 7 +------ 2 files changed, 8 insertions(+), 16 deletions(-) (limited to 'lib/puppet/network/handler') 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 -- cgit From fd11603fe47668ba72f0d3f2b984174331a0a154 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 3 Oct 2007 21:55:41 -0500 Subject: Removing the Id tags from all of the files --- lib/puppet/network/handler/ca.rb | 1 - lib/puppet/network/handler/filebucket.rb | 1 - lib/puppet/network/handler/fileserver.rb | 1 - lib/puppet/network/handler/report.rb | 1 - lib/puppet/network/handler/resource.rb | 1 - lib/puppet/network/handler/runner.rb | 1 - lib/puppet/network/handler/status.rb | 1 - 7 files changed, 7 deletions(-) (limited to 'lib/puppet/network/handler') diff --git a/lib/puppet/network/handler/ca.rb b/lib/puppet/network/handler/ca.rb index 052eb5c19..de7a976c8 100644 --- a/lib/puppet/network/handler/ca.rb +++ b/lib/puppet/network/handler/ca.rb @@ -155,4 +155,3 @@ class Puppet::Network::Handler end end -# $Id$ diff --git a/lib/puppet/network/handler/filebucket.rb b/lib/puppet/network/handler/filebucket.rb index 1bf8da854..38ef7f3f2 100755 --- a/lib/puppet/network/handler/filebucket.rb +++ b/lib/puppet/network/handler/filebucket.rb @@ -180,4 +180,3 @@ class Puppet::Network::Handler # :nodoc: end end -# $Id$ diff --git a/lib/puppet/network/handler/fileserver.rb b/lib/puppet/network/handler/fileserver.rb index ae0e6553d..dd00450be 100755 --- a/lib/puppet/network/handler/fileserver.rb +++ b/lib/puppet/network/handler/fileserver.rb @@ -676,4 +676,3 @@ class Puppet::Network::Handler end end -# $Id$ diff --git a/lib/puppet/network/handler/report.rb b/lib/puppet/network/handler/report.rb index 62e9cfdec..e202d4e2a 100755 --- a/lib/puppet/network/handler/report.rb +++ b/lib/puppet/network/handler/report.rb @@ -142,4 +142,3 @@ class Puppet::Network::Handler end end -# $Id$ diff --git a/lib/puppet/network/handler/resource.rb b/lib/puppet/network/handler/resource.rb index 7709b85fe..0fcd694fb 100755 --- a/lib/puppet/network/handler/resource.rb +++ b/lib/puppet/network/handler/resource.rb @@ -192,4 +192,3 @@ class Puppet::Network::Handler end end -# $Id$ diff --git a/lib/puppet/network/handler/runner.rb b/lib/puppet/network/handler/runner.rb index 4b9ccab75..a8d0da9ce 100755 --- a/lib/puppet/network/handler/runner.rb +++ b/lib/puppet/network/handler/runner.rb @@ -62,4 +62,3 @@ class Puppet::Network::Handler end end -# $Id$ diff --git a/lib/puppet/network/handler/status.rb b/lib/puppet/network/handler/status.rb index 48668ca47..fbdc7a765 100644 --- a/lib/puppet/network/handler/status.rb +++ b/lib/puppet/network/handler/status.rb @@ -14,4 +14,3 @@ class Puppet::Network::Handler end end -# $Id$ -- cgit