Skip to content

Commit

Permalink
Restore errors.go
Browse files Browse the repository at this point in the history
  • Loading branch information
assada committed Nov 29, 2018
1 parent e7ed9b6 commit 920a263
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions manager/errors.go
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package version

import "fmt"

const Version = "0.2.4"
const Version = "0.2.5"

var (
Name string
Expand Down

0 comments on commit 920a263

Please sign in to comment.