airshipctl/pkg/errors/common.go
Dmitry Ukov c1ed28fd25 Move all error structs to common package 'errors'
Change-Id: I91e9610b27244fe5d7500575eae24647e256dab8
2019-12-01 14:14:09 +04:00

31 lines
642 B
Go

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 {
}
func (e ErrNotImplemented) Error() string {
return "Error. Not implemented"
}
// ErrWrongConfig returned in case of incorrect configuration
type ErrWrongConfig struct {
}
func (e ErrWrongConfig) Error() string {
return "Error. Wrong configuration"
}