OLD | NEW |
1 // Copyright 2013 Canonical Ltd. | 1 // Copyright 2013 Canonical Ltd. |
2 // Licensed under the AGPLv3, see LICENCE file for details. | 2 // Licensed under the AGPLv3, see LICENCE file for details. |
3 | 3 |
4 package common | 4 package common |
5 | 5 |
6 import ( | 6 import ( |
7 stderrors "errors" | 7 stderrors "errors" |
8 "fmt" | 8 "fmt" |
9 | 9 |
10 » "launchpad.net/juju-core/errors" | 10 » "github.com/juju/errors" |
| 11 |
11 "launchpad.net/juju-core/state" | 12 "launchpad.net/juju-core/state" |
12 "launchpad.net/juju-core/state/api/params" | 13 "launchpad.net/juju-core/state/api/params" |
13 ) | 14 ) |
14 | 15 |
15 type notSupportedError struct { | 16 type notSupportedError struct { |
16 entity string | 17 entity string |
17 operation string | 18 operation string |
18 } | 19 } |
19 | 20 |
20 func (e *notSupportedError) Error() string { | 21 func (e *notSupportedError) Error() string { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 case state.IsNotProvisionedError(err): | 106 case state.IsNotProvisionedError(err): |
106 code = params.CodeNotProvisioned | 107 code = params.CodeNotProvisioned |
107 default: | 108 default: |
108 code = params.ErrCode(err) | 109 code = params.ErrCode(err) |
109 } | 110 } |
110 return ¶ms.Error{ | 111 return ¶ms.Error{ |
111 Message: err.Error(), | 112 Message: err.Error(), |
112 Code: code, | 113 Code: code, |
113 } | 114 } |
114 } | 115 } |
OLD | NEW |