Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(791)

Side by Side Diff: state/apiserver/common/errors.go

Issue 93410043: Extract errors package to github.com/juju/errors
Patch Set: Created 9 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 &params.Error{ 111 return &params.Error{
111 Message: err.Error(), 112 Message: err.Error(),
112 Code: code, 113 Code: code,
113 } 114 }
114 } 115 }
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b