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

Replace use of "Puppet::Util::Errors#fail" in puppet code base when it is not the Ruby alias for "raise"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • None
    • Needs Assessment

    Description

      We are using the method fail in a couple of places in the puppet code base to deal with the issuing of an error (it ultimately leads to a raised error). The problem with using the name fail is that it is also an alias for raise and for newcomers to the puppet code base, the unorthodox use of fail may be confusing.

      The Errors module is also mixed into providers, so it gets called from there too:

              fail Puppet::Error, _("File paths must be fully qualified, not '%{path}'") % { path: value }
      

      Suggested name: raise_issue, and in the cases where the "raise" is optional optionally_raise_issue (when the issue is configurable as warning or error).

      Attachments

        Activity

          People

            Unassigned Unassigned
            henrik.lindberg Henrik Lindberg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support