Method: Puppet::Parameter#munge
- Defined in:
- lib/puppet/parameter.rb
#munge(value) ⇒ Object
Note:
This method should not be overridden. Use the DSL method munge to define a munging method if required.
Munges the value from DSL form to internal form. This implementation of munge provides exception handling around the specified munging of this parameter.
440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/puppet/parameter.rb', line 440 def munge(value) return value if value.is_a?(Puppet::Pops::Evaluator::DeferredValue) begin ret = unsafe_munge(value) rescue Puppet::Error => detail Puppet.debug { "Reraising #{detail}" } raise rescue => detail raise Puppet::DevError, _("Munging failed for value %{value} in class %{class_name}: %{detail}") % { value: value.inspect, class_name: name, detail: detail }, detail.backtrace end ret end |