Refactor errors

This commit is contained in:
Unrud 2023-04-25 01:38:48 +02:00
parent 91a37de0fb
commit 891fde7051
5 changed files with 43 additions and 35 deletions

View file

@ -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 {