Issue #15746 has been updated by Josh Cooper.

Project changed from Hiera-Puppet to Puppet


----------------------------------------
Bug #15746: Hiera puppet backend silently ignores exceptions
https://projects.puppetlabs.com/issues/15746#change-76950

Author: Ellison Marks
Status: Accepted
Priority: Normal
Assignee: Ellison Marks
Category: 
Target version: 
Affected Puppet version: 
Keywords: debugging
Branch: 


<pre>unless loaded_classes.include?(klass)
  begin
    if scope.respond_to?(:function_include)
      scope.function_include(klass)
    else
      scope.real.function_include(klass)
    end
    temp_answer = scope[varname]
    Hiera.debug("Found data in class #{klass}")
  rescue
  end
else
  temp_answer = scope[varname]
end</pre>

While working with hiera's puppet backend, I made a syntax error in one of my 
data classes, such that when calling a hiera function it would fail to load. 
Due to the above code, however, there was no indication that such an error was 
occurring. The only hiera messages when I enabled debug in the puppet master 
was the following:

<pre>Could not find data item classes in any Hiera data file and no default 
supplied at /etc/puppet/manifests/site.pp</pre>

Perhaps something like this would be useful. I added it temporarily to help me 
find the error.

<pre>rescue Exception=>e
  Hiera.debug(e.message)
  Hiera.debug(e.backtrace.inspect)
end</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to