summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorAndrew Shafer <andrew@reductivelabs.com>2008-06-13 18:11:20 -0600
committerAndrew Shafer <andrew@reductivelabs.com>2008-06-13 18:11:20 -0600
commit4539b1cccbc5bf6287e322d7296c4b7cfc47e4ce (patch)
tree0a97a1cf5b88bacb21902f31d4eb44b3296e4adb /lib/puppet/parser
parent28e4dd3ff65fba7ed4d8b211bd5920618c2025ea (diff)
downloadpuppet-4539b1cccbc5bf6287e322d7296c4b7cfc47e4ce.tar.gz
puppet-4539b1cccbc5bf6287e322d7296c4b7cfc47e4ce.tar.xz
puppet-4539b1cccbc5bf6287e322d7296c4b7cfc47e4ce.zip
Issue 1215
Removed logic to reuse parser and log on server when there is a parsing error. Now we just make a new parser and if there is an error, raise it up, which will result in errors on the client logs.
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/interpreter.rb19
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/puppet/parser/interpreter.rb b/lib/puppet/parser/interpreter.rb
index 04ca41494..423c34a4e 100644
--- a/lib/puppet/parser/interpreter.rb
+++ b/lib/puppet/parser/interpreter.rb
@@ -50,23 +50,8 @@ class Puppet::Parser::Interpreter
# Return the parser for a specific environment.
def parser(environment)
if ! @parsers[environment] or @parsers[environment].reparse?
- # This will throw an exception if it does not succeed. We only
- # want to get rid of the old parser if we successfully create a new
- # one.
- begin
- tmp = create_parser(environment)
- @parsers[environment].clear if @parsers[environment]
- @parsers[environment] = tmp
- rescue => detail
- # If a parser already exists, than assume that we logged the
- # exception elsewhere and reuse the parser. If one doesn't
- # exist, then reraise.
- if @parsers[environment]
- Puppet.err(detail.to_s + "; using previously parsed manifests")
- else
- raise detail
- end
- end
+ # This will throw an exception if it does not succeed.
+ @parsers[environment] = create_parser(environment)
end
@parsers[environment]
end