On 2013-15-09 3:11, William Van Hevelingen wrote:
Hi Henrik or Eric,

Is it possible to error on failed lookups? This is useful for replacing
the fail('osfamily not supported') lines in most params.pp files. Ryan
mentioned the same thing in the ticket and I wasn't sure if it was resolved.

It currently returns undef if the value is not found.


It should error if a parameterized class does not get a value for a parameter (and it has no default value), but it does not do that for an explicit lookup.

It has been brought up earlier that it is a bit klunky to lookup a value and use a default as a check is needed. I can imagine changing the lookup signature to take name, type and default. If no default is given it could be made to raise an error if name does not exist.

Regards
- henrik


--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to