Refactor errors
This commit is contained in:
parent
91a37de0fb
commit
891fde7051
5 changed files with 43 additions and 35 deletions
|
|
@ -70,11 +70,15 @@ func RegisterController(name string, init func() (Controller, error), priority i
|
|||
}
|
||||
|
||||
type UnsupportedPlatformError struct {
|
||||
err error
|
||||
Err error
|
||||
}
|
||||
|
||||
func (e UnsupportedPlatformError) Error() string {
|
||||
return e.err.Error()
|
||||
func (e *UnsupportedPlatformError) Error() string {
|
||||
return e.Err.Error()
|
||||
}
|
||||
|
||||
func (e *UnsupportedPlatformError) Unwrap() error {
|
||||
return e.Err
|
||||
}
|
||||
|
||||
type Controller interface {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue