diff --git a/manager/errors.go b/manager/errors.go new file mode 100644 index 0000000..df1f40e --- /dev/null +++ b/manager/errors.go @@ -0,0 +1,26 @@ +package manager + +import "fmt" + +type ErrExitable interface { + ExitStatus() int +} + +var _ error = new(ErrChildDied) +var _ ErrExitable = new(ErrChildDied) + +type ErrChildDied struct { + code int +} + +func NewErrChildDied(c int) *ErrChildDied { + return &ErrChildDied{code: c} +} + +func (e *ErrChildDied) Error() string { + return fmt.Sprintf("child process died with exit code %d", e.code) +} + +func (e *ErrChildDied) ExitStatus() int { + return e.code +} diff --git a/version/version.go b/version/version.go index 3bbca96..104a364 100644 --- a/version/version.go +++ b/version/version.go @@ -2,7 +2,7 @@ package version import "fmt" -const Version = "0.2.4" +const Version = "0.2.5" var ( Name string