File: generate_error_message.rb

package info (click to toggle)
puppet-module-puppetlabs-haproxy 8.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 816 kB
  • sloc: ruby: 3,979; sh: 14; makefile: 4
file content (14 lines) | stat: -rw-r--r-- 403 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

# Function created to generate error message. Any string as error message can be passed and the function can
# be called in epp templates.

Puppet::Functions.create_function(:'haproxy::generate_error_message') do
  dispatch :generate_error_message do
    param 'String', :error_message
  end

  def generate_error_message(error_message)
    raise(error_message)
  end
end