Merge pull request #90 from baltimore-puppet-users-group/PDOC-71

(PDOC-71) Workaround for spurious error failures
This commit is contained in:
Henrik Lindberg 2016-07-18 13:14:29 +02:00 committed by GitHub
commit 138dc25a7b
1 changed files with 42 additions and 29 deletions

View File

@ -2,6 +2,7 @@ class PuppetX::PuppetLabs::Strings::YARD::Handlers::HostClassHandler < PuppetX::
handles HostClassDefinition
process do
begin
obj = HostClassObject.new(:root, statement.pops_obj.name)
obj.parameters = statement.parameters.map do |a|
@ -38,5 +39,17 @@ class PuppetX::PuppetLabs::Strings::YARD::Handlers::HostClassHandler < PuppetX::
end
register obj
rescue StandardError, SystemStackError => e
# If we hit this, we've thrown an exception somewhere that should be
# addressed but should not break the build.
#
# SystemStackError is being caught due to a presently untraced bug in
# either YARD or the Puppet Parser.
#
# Note: Documentation will *not* be generated for any item listed here,
# but you will get the rest of your documentation!
$stderr.puts("Ignored: #{e.inspect} at #{obj.title}")
end
end
end