Fix other
This commit is contained in:
25
pkg/errors/errors.go
Normal file
25
pkg/errors/errors.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package errors
|
||||
|
||||
import "fmt"
|
||||
|
||||
type (
|
||||
WinError struct {
|
||||
err string
|
||||
_code uint32
|
||||
}
|
||||
)
|
||||
|
||||
func New(err any, exitCode uint32) *WinError {
|
||||
return &WinError{
|
||||
err: fmt.Sprintf("%v", err),
|
||||
_code: exitCode,
|
||||
}
|
||||
}
|
||||
|
||||
func (e *WinError) Error() string {
|
||||
return e.err
|
||||
}
|
||||
|
||||
func (e *WinError) ExitCode() uint32 {
|
||||
return e._code
|
||||
}
|
||||
Reference in New Issue
Block a user