~menno.smits/juju-core/1194481-relation_name_in_status.0

« back to all changes in this revision

Viewing changes to constraints/constraints.go

  • Committer: Tarmac
  • Author(s): Tim Penhey
  • Date: 2014-05-15 02:49:48 UTC
  • mfrom: (2722.2.11 juju-errors)
  • Revision ID: tarmac-20140515024948-mdinmvuq3nkxrxxi
[r=thumper] Extract errors package to github.com/juju/errors

Also introduces a dependency on github.com/juju/errgo
and removes the github.com/errgo/errgo dependency.

Adds additional functions for simple tracing and
annotations of errors.

https://codereview.appspot.com/93410043/

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
        "strconv"
11
11
        "strings"
12
12
 
13
 
        "github.com/errgo/errgo"
 
13
        "github.com/juju/errors"
14
14
 
15
15
        "launchpad.net/juju-core/instance"
16
16
        "launchpad.net/juju-core/juju/arch"
274
274
                return fmt.Errorf("unknown constraint %q", name)
275
275
        }
276
276
        if err != nil {
277
 
                return errgo.Annotatef(err, "bad %q constraint", name)
 
277
                return errors.Annotatef(err, "bad %q constraint", name)
278
278
        }
279
279
        return nil
280
280
}