puppetlabs/puppet · error · Puppet::ParseError
#{subject}: #{errors_str}
Error message
#{subject}:
#{errors_str} What it means
Error "#{subject}: #{errors_str}" thrown in puppetlabs/puppet.
Source
Thrown at lib/puppet/pops/types/type_mismatch_describer.rb:539
# with the corresponding param_struct element and that all required values are provided.
#
# @param subject [String] string to be prepended to the exception message
# @param params_struct [PStructType] Struct to use for validation
# @param given_hash [Hash<String,Object>] the parameters to validate
# @param missing_ok [Boolean] Do not generate errors on missing parameters
# @param tense [Symbol] deprecated and ignored
#
def validate_parameters(subject, params_struct, given_hash, missing_ok = false, tense = :ignored)
tense_deprecated unless tense == :ignored
errors = describe_struct_signature(params_struct, given_hash, missing_ok).flatten
case errors.size
when 0
# do nothing
when 1
raise Puppet::ParseError, "#{subject}:#{errors[0].format}"
else
errors_str = errors.map(&:format).join("\n ")
raise Puppet::ParseError, "#{subject}:\n #{errors_str}"
end
end
# Describe a confirmed mismatch using present tense
#
# @param name [String] name of mismatch
# @param expected [PAnyType] expected type
# @param actual [PAnyType] actual type
# @param tense [Symbol] deprecated and ignored
#
def describe_mismatch(name, expected, actual, tense = :ignored)
tense_deprecated unless tense == :ignored
errors = describe(expected, actual, [SubjectPathElement.new(name)])
case errors.size
when 0
''
when 1
errors[0].format.stripView on GitHub (pinned to e227c27540)
When it happens
Trigger: Thrown at lib/puppet/pops/types/type_mismatch_describer.rb:539 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/42ca6765c84ed0be.
Report an issue: GitHub.