|
various: Use params.IsCode*(err) helpers
I'm getting sick of writing every time:
if params.ErrCode(err) == params.CodeSomething
So I added a bunch of IsCode*(err) helpers to simplify
this.
https://code.launchpad.net/~dimitern/juju-core/136-params-error-code-helpers/+merge/185461
(do not edit description out of merge proposal)
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+170 lines, -96 lines) |
Patch |
 |
A |
[revision details]
|
View
|
1
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
agent/agent.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
cmd/jujud/agent.go
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
state/api/agent/machine_test.go
|
View
|
1
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
state/api/agent/unit_test.go
|
View
|
1
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
state/api/deployer/deployer_test.go
|
View
|
1
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
state/api/machiner/machiner_test.go
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
state/api/params/apierror.go
|
View
|
|
1 chunk |
+44 lines, -0 lines |
0 comments
|
Download
|
 |
M |
state/api/uniter/relation_test.go
|
View
|
1
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
state/api/uniter/relationunit_test.go
|
View
|
1
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
state/api/uniter/unit_test.go
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
state/api/upgrader/upgrader_test.go
|
View
|
1
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
state/api/watcher/watcher.go
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
state/apiserver/client/perm_test.go
|
View
|
1
|
9 chunks |
+12 lines, -9 lines |
0 comments
|
Download
|
 |
M |
state/apiserver/common/errors_test.go
|
View
|
1
|
3 chunks |
+72 lines, -49 lines |
0 comments
|
Download
|
 |
M |
worker/deployer/deployer.go
|
View
|
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
worker/machiner/machiner.go
|
View
|
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
worker/uniter/context.go
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
worker/uniter/filter.go
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
worker/uniter/uniter.go
|
View
|
|
4 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
Total messages: 3
|