Pass line and file to exception.  A more general solution to these
sorts of issues is on the code smell list.

Signed-off-by: Markus Roberts <[email protected]>
---
 lib/puppet/type/file.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb
index a4666a9..6361dd0 100644
--- a/lib/puppet/type/file.rb
+++ b/lib/puppet/type/file.rb
@@ -31,7 +31,7 @@ module Puppet
 
             validate do |value|
                 unless value =~ /^#{File::SEPARATOR}/
-                    raise Puppet::Error, "File paths must be fully qualified, 
not '%s'" % value
+                    raise Puppet::Error.new("File paths must be fully 
qualified, not '#{value}",line,file)
                 end
             end
 
-- 
1.6.4

--

You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.


Reply via email to