Merge pull request #38 from iankronquist/better-type-error

(maint) Remove unused code path
This commit is contained in:
Hailee Kenney 2015-07-17 10:59:06 -07:00
commit bd319f3c82
1 changed files with 3 additions and 4 deletions

View File

@ -13,14 +13,13 @@ class PuppetX::PuppetLabs::Strings::YARD::Handlers::HostClassHandler < PuppetX::
statement.pops_obj.parameters.each do |pop_param| statement.pops_obj.parameters.each do |pop_param|
# If the parameter's type expression is nil, default to Any # If the parameter's type expression is nil, default to Any
if pop_param.type_expr == nil if pop_param.type_expr == nil
param_type_info[pop_param.name] = Puppet::Pops::Types::TypeFactory.any() param_type_info[pop_param.name] = Puppet::Pops::Types::TypeFactory.any()
else else
begin begin
param_type_info[pop_param.name] = tp.interpret_any(pop_param.type_expr) param_type_info[pop_param.name] = tp.interpret_any(pop_param.type_expr)
rescue Puppet::ParseError rescue Puppet::ParseError => e
# If the type could not be interpreted insert a prominent warning # If the type could not be interpreted insert a prominent warning
param_type_info[pop_param.name] = "TypeError - " + param_type_info[pop_param.name] = "Type Error: #{e.message}"
"#{pop_param.type_expr} isn't a valid type."
end end
end end
end end