MoreImportantError does not describe what happens errors have equal importance

Bug #1811636 reported by Tim McNamara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

cmd/jujud/util/util.go (https://github.com/juju/juju/blob/f747191ed950a2b989e42916de5f9b333889ded7/cmd/jujud/util/util.go#L90) does not describe what should happen in the case of a draw. It currently returns the second argument, in essence giving err1 more weight over err0.

    // MoreImportantError returns the most important error
    func MoreImportantError(err0, err1 error) error {
     if importance(err0) > importance(err1) {
      return err0
     }
     return err1
    }

This behaviour may be intentional, but should be made explicit in the function's documentation.

Changed in juju:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Medium → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.