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

create_resources() error messages are less useful in 3.x then they were in 2.x

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: PUP 3.7.5
    • Component/s: None
    • Labels:
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-03-04, Language 2015-03-18

      Description

      When create_resources() function causes puppet logic to be evaluated, certain errors are not displayed with the puppet context (file/line) that they appear in.
      This can be observed with this simple sample:

      class breaking {
        $x = 'foo' + 'bar'
      }
      $classes = { 'breaking' => {} }
      create_resources('class', $classes)
      

      The result on Puppet 3.7.4 (with current parser) is:

      Error: left operand of + is not a number at /Users/henrik/git/puppet/foo.pp:5 on node ...
      

      The result with Puppet 3.7.4 (with future parser) and puppet 4.0.0 is:

      Error: Evaluation Error: The value 'foo' cannot be converted to Numeric. at /Users/henrik/git/puppet/foo.pp:2:8 on node ...
      

      Thus, the problem is at least fixed in newer versions.

      ORIGINAL REPORT


      In PE 2.8 (Puppet 2.7.x) this function will show the file/line number detail of the Puppet DSL code where the exception occurred.

      In PE 3.x(including PE 3.7 / Puppet 3.7) it shows the file/line number of the Puppet DSL where the create_resources() function was invoked - which is not helpful.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  lee Lee Lowder
                  QA Contact:
                  Eric Thompson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support