Move all error structs to common package 'errors'
Change-Id: I91e9610b27244fe5d7500575eae24647e256dab8
This commit is contained in:
parent
8dd721830b
commit
c1ed28fd25
@ -1,14 +0,0 @@
|
||||
package error
|
||||
|
||||
// AirshipError is the base error type
|
||||
// used to create extended error types
|
||||
// in other airshipctl packages.
|
||||
type AirshipError struct {
|
||||
Message string
|
||||
}
|
||||
|
||||
// Error function implments the golang
|
||||
// error interface
|
||||
func (ae *AirshipError) Error() string {
|
||||
return ae.Message
|
||||
}
|
@ -1,5 +1,18 @@
|
||||
package errors
|
||||
|
||||
// AirshipError is the base error type
|
||||
// used to create extended error types
|
||||
// in other airshipctl packages.
|
||||
type AirshipError struct {
|
||||
Message string
|
||||
}
|
||||
|
||||
// Error function implments the golang
|
||||
// error interface
|
||||
func (ae *AirshipError) Error() string {
|
||||
return ae.Message
|
||||
}
|
||||
|
||||
// ErrNotImplemented returned for not implemented features
|
||||
type ErrNotImplemented struct {
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ package remote
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
aerror "opendev.org/airship/airshipctl/pkg/error"
|
||||
aerror "opendev.org/airship/airshipctl/pkg/errors"
|
||||
)
|
||||
|
||||
type RemoteDirectError struct {
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
aerror "opendev.org/airship/airshipctl/pkg/error"
|
||||
aerror "opendev.org/airship/airshipctl/pkg/errors"
|
||||
)
|
||||
|
||||
type RedfishClientError struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user