lib/puppet/parameter.rb
# Performs validation of the given value against the rules defined by this parameter.
# @return [void]
# @todo Better description of when the various exceptions are raised.ArgumentError is rescued and
#   changed into Puppet::Error.
# @raise [ArgumentError, TypeError, Puppet::DevError, Puppet::Error] under various conditions
# A protected validation method that only ever raises useful exceptions.
# @api public
#
Performs validation of the given value against the rules defined by this parameter.
Performs validation of the given value against the rules defined by this parameter .
def validate(value)
    begin
      unsafe_validate(value)
    rescue ArgumentError => detail
      fail detail.to_s
    rescue Puppet::Error, TypeError
      raise
    rescue => detail
      raise Puppet::DevError, "Validate method failed for class #{self.name}: #{detail}", detail.backtrace
    end
  end
def validate ( value ) begin unsafe_validate ( value ) rescue ArgumentError => detail fail detail . to_s rescue Puppet :: Error , TypeError raise rescue => detail raise Puppet :: DevError , "Validate method failed for class #{self.name}: #{detail}" , detail . backtrace end end
Performs validation of the given value against the rules defined by this parameter.
Performs validation of the given value against the rules defined by this parameter .
None
void
[ArgumentError, TypeError, Puppet::DevError, Puppet::Error] under various conditions A protected validation method that only ever raises useful exceptions.
[ ArgumentError TypeError Puppet :: DevError Puppet :: Error ] under various conditions A protected validation method that only ever raises useful exceptions .
value
<not_specific>
todo
Better description of when the various exceptions are raised.ArgumentError is rescued and changed into Puppet::Error.
Better description of when the various exceptions are raised . ArgumentError is rescued and changed into Puppet :: Error .
api
None