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

Confusing error message for invalid types for comparison operations

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PUP 4.4.0
    • Fix Version/s: PUP 3.8.7, PUP 4.4.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2016-01-27, Language 2016-02-10
    • Release Notes:
      Not Needed
    • Release Notes Summary:
      For users this means getting a better error message.

      Description

      The following code:

      notice(undef > foo)
      

      Produces this confusing error message:

      Error: Evaluation Error: Comparison of: #<Puppet::Pops::Model::ModelLabelProvider:0x007fd5943285b8> > String, is not possible. Caused by 'Only Strings and Numbers are comparable'.
      

      Expected the compiler's error message to say "Comparison of Undef > String is not possible..."

      I'm going to guess that the other comparison operators are similarly affected.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  peter.huene Peter Huene
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support