From f0460675bb2aab878ca97c8dbc66485912cf73c9 Mon Sep 17 00:00:00 2001 From: luke Date: Mon, 19 Mar 2007 17:42:57 +0000 Subject: Adding context to the warning message about unknown escapes git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2319 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/parser/scope.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/puppet/parser') diff --git a/lib/puppet/parser/scope.rb b/lib/puppet/parser/scope.rb index e5d7df7ca..ef5e9b003 100644 --- a/lib/puppet/parser/scope.rb +++ b/lib/puppet/parser/scope.rb @@ -568,7 +568,14 @@ class Puppet::Parser::Scope when '$' out << '$' else - Puppet.warning "Unrecognised escape sequence '#{ss.matched}'" + str = "Unrecognised escape sequence '#{ss.matched}'" + if file + str += " in file %s" % file + end + if line + str += " at line %s" % line + end + Puppet.warning str out << ss.matched end elsif ss.scan(/^\$/) -- cgit