wasi-module-sdk-go/exec/err.go

16 lines
255 B
Go
Raw Normal View History

2023-06-29 19:55:40 +00:00
package exec
import "fmt"
var _ error = (*Error)(nil)
type Error struct {
ExitCode int
Message string
StdErr []byte
}
func (e Error) Error() string {
return fmt.Sprintf("command exited with code %d: %s - %s", e.ExitCode, e.Message, e.StdErr)
}