From 1f0ea5a0e8629f0ff281153d710ef9e75bee3134 Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Tue, 19 Feb 2008 15:42:12 +1100 Subject: Second attempt fix address ticket #1040 --- lib/puppet/parser/interpreter.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/puppet/parser') diff --git a/lib/puppet/parser/interpreter.rb b/lib/puppet/parser/interpreter.rb index 27192af17..33f66e8c2 100644 --- a/lib/puppet/parser/interpreter.rb +++ b/lib/puppet/parser/interpreter.rb @@ -24,11 +24,14 @@ class Puppet::Parser::Interpreter # evaluate our whole tree def compile(node) - raise Puppet::ParseError, "Could not parse configuration; cannot compile" unless env_parser = parser(node.environment) + raise Puppet::ParseError, "Could not parse configuration; cannot compile on node %s" % node.name unless env_parser = parser(node.environment) begin return Puppet::Parser::Compiler.new(node, env_parser).compile - rescue - raise Puppet::Error, "Could not compile node %s" % node + rescue => detail + raise Puppet::Error, detail.to_s + " on node %s" % node.name + if Puppet[:trace] + puts detail.backtrace + end end end -- cgit