Issue #7625 has been updated by Jacob Helwig. Status changed from In Topic Branch Pending Merge to Code Insufficient
>From the discussion on the mailing list, it looks like Dan and Stefan are >still working on this one: >http://groups.google.com/group/puppet-dev/browse_thread/thread/670470d2d448b65/4c593e7595be4994 ---------------------------------------- Bug #7625: An explicit error should be raised if no title_pattern is matched https://projects.puppetlabs.com/issues/7625 Author: Dan Bode Status: Code Insufficient Priority: Normal Assignee: Category: plumbing Target version: Affected Puppet version: 2.7.0rc1 Keywords: Branch: https://github.com/bodepd/puppet/tree/issue/next/7625 When a type has implemented pattern matching, Puppet should raise an explicit error. type code: <pre> Puppet::Type.newtype(:limits) do def self.title_patterns [ [ /^(\S+)\/(hard|soft)\/(\S+)$/, # Set name and protocol [ [ :name, lambda{|x| x} ], [ :type, lambda{ |x| x } ], [ :item, lambda{|x| x} ] ] ] end </pre> Puppet code with invalid title: <pre> limits { 'dan': value => '2' } </pre> result <pre> # puppet apply tests/limits.pp --trace /usr/local/dev/puppet/lib/puppet/resource.rb:234:in `to_hash' /usr/local/dev/puppet/lib/puppet/type.rb:1761:in `initialize' /usr/local/dev/puppet/lib/puppet/resource.rb:285:in `new' /usr/local/dev/puppet/lib/puppet/resource.rb:285:in `to_ral' /usr/local/dev/puppet/lib/puppet/resource/catalog.rb:612:in `send' /usr/local/dev/puppet/lib/puppet/resource/catalog.rb:612:in `to_catalog' /usr/local/dev/puppet/lib/puppet/resource/catalog.rb:590:in `each' /usr/local/dev/puppet/lib/puppet/resource/catalog.rb:590:in `to_catalog' /usr/local/dev/puppet/lib/puppet/resource/catalog.rb:527:in `to_ral' /usr/local/dev/puppet/lib/puppet/application/apply.rb:201:in `main' /usr/local/dev/puppet/lib/puppet/application/apply.rb:134:in `run_command' /usr/local/dev/puppet/lib/puppet/application.rb:307:in `run' /usr/local/dev/puppet/lib/puppet/application.rb:411:in `hook' /usr/local/dev/puppet/lib/puppet/application.rb:307:in `run' /usr/local/dev/puppet/lib/puppet/application.rb:402:in `exit_on_fail' /usr/local/dev/puppet/lib/puppet/application.rb:307:in `run' /usr/local/dev/puppet/lib/puppet/util/command_line.rb:62:in `execute' /usr/local/dev/puppet/bin/puppet:4 undefined method `merge' for #<Array:0xb79930d8> </pre> -- 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.
