puppetlabs/puppet · error · Puppet::ParseError

vals.to_s

Error message

vals.to_s

What it means

Error "vals.to_s" thrown in puppetlabs/puppet.

Source

Thrown at lib/puppet/parser/functions/fail.rb:12

# frozen_string_literal: true

Puppet::Parser::Functions.newfunction(
  :fail,
  :arity => -1,
  :doc => <<~DOC
    Fail with a parse error. Any parameters will be stringified,
    concatenated, and passed to the exception-handler.
  DOC
) do |vals|
  vals = vals.collect(&:to_s).join(" ") if vals.is_a? Array
  raise Puppet::ParseError, vals.to_s
end

View on GitHub (pinned to e227c27540)

When it happens

Trigger: Thrown at lib/puppet/parser/functions/fail.rb:12 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/f5f43f1fb83400cc. Report an issue: GitHub.