Sha256: 17ad35b04c5e1e8438d596c55f250f74e396d6235a4ab80554692be95c14c3bc

Contents?: true

Size: 360 Bytes

Versions: 20

Compression:

Stored size: 360 Bytes

Contents

# 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 { |s| s.to_s }.join(" ") if vals.is_a? Array
    raise Puppet::ParseError, vals.to_s
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-8.3.0 lib/puppet/parser/functions/fail.rb
puppet-8.3.0-x86-mingw32 lib/puppet/parser/functions/fail.rb
puppet-8.3.0-x64-mingw32 lib/puppet/parser/functions/fail.rb
puppet-8.3.0-universal-darwin lib/puppet/parser/functions/fail.rb
puppet-8.3.1 lib/puppet/parser/functions/fail.rb
puppet-8.3.1-x86-mingw32 lib/puppet/parser/functions/fail.rb
puppet-8.3.1-x64-mingw32 lib/puppet/parser/functions/fail.rb
puppet-8.3.1-universal-darwin lib/puppet/parser/functions/fail.rb
puppet-8.2.0 lib/puppet/parser/functions/fail.rb
puppet-8.2.0-x86-mingw32 lib/puppet/parser/functions/fail.rb
puppet-8.2.0-x64-mingw32 lib/puppet/parser/functions/fail.rb
puppet-8.2.0-universal-darwin lib/puppet/parser/functions/fail.rb
puppet-8.1.0 lib/puppet/parser/functions/fail.rb
puppet-8.1.0-x86-mingw32 lib/puppet/parser/functions/fail.rb
puppet-8.1.0-x64-mingw32 lib/puppet/parser/functions/fail.rb
puppet-8.1.0-universal-darwin lib/puppet/parser/functions/fail.rb
puppet-8.0.1 lib/puppet/parser/functions/fail.rb
puppet-8.0.1-x86-mingw32 lib/puppet/parser/functions/fail.rb
puppet-8.0.1-x64-mingw32 lib/puppet/parser/functions/fail.rb
puppet-8.0.1-universal-darwin lib/puppet/parser/functions/fail.rb