Issue #4598 has been updated by James Turnbull. Category set to metaparameters Status changed from Unreviewed to Needs design decision Assignee set to Luke Kanies
---------------------------------------- Feature #4598: fail should be usable in a selector http://projects.puppetlabs.com/issues/4598 Author: Alan Barrett Status: Needs design decision Priority: Normal Assignee: Luke Kanies Category: metaparameters Target version: Affected version: Keywords: Branch: It would be nice if this worked better: <pre> notify { "test": message => $environment ? { production => "http://blah/blah/prod", development => "http://blah/blah/dev", default => fail("environment '${environment}' is not yet supported"), } } </pre> Desired result when the default branch of the selector is taken: Failure to compile the catalog, with the error message "environment 'foo' is not supported". Actual result when the default branch of the selector is taken: Failure to compile the catalog, with the error message "Function 'fail' does not return a value". Use case: Downloading an environment-dependent URL on the client. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
