Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7783

error message when using break() instead of return() is hard to understand

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Language
    • Labels:
      None
    • Template:
    • Sub-team:
    • Team:
      Platform Core
    • Story Points:
      1
    • Method Found:
      Needs Assessment
    • Release Notes:
      Not Needed
    • Release Notes Summary:
      only improvement of an error message
    • QA Risk Assessment:
      Needs Assessment

      Description

      I made the following error, using break() instead of return()

      class foobar {                                                                                                                                                           
        if $facts['hostname'] == 'blah' {
          break()
        }
           # some code                                                                                                                                                                                 
      }  
      

      And I got this error on host blah:

      # puppet agent -t
      Info: Using configured environment 'common'
      Info: Retrieving pluginfacts
      Info: Retrieving plugin
      Info: Loading facts
      Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Puppet::Pops::Evaluator::PuppetStopIteration on node blah.example.com
      Warning: Not using cache on failed catalog
      Error: Could not retrieve catalog; skipping run
      

      A more readable error would be highly appreciated. Thanks for taking this into consideration.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            hboetes Han Boetes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support