job.error\* now return engine.StatusErr

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 24086fa75dff1ebb56dfb8fbf2c80fdfd5be0e8a
Component: engine
This commit is contained in:
Victor Vieux
2014-01-28 00:27:02 +00:00
parent d1aba4a6ea
commit b237b19a08
2 changed files with 154 additions and 302 deletions

View File

@ -188,10 +188,12 @@ func (job *Job) Printf(format string, args ...interface{}) (n int, err error) {
return fmt.Fprintf(job.Stdout, format, args...)
}
func (job *Job) Errorf(format string, args ...interface{}) (n int, err error) {
return fmt.Fprintf(job.Stderr, format, args...)
func (job *Job) Errorf(format string, args ...interface{}) Status {
fmt.Fprintf(job.Stderr, format, args...)
return StatusErr
}
func (job *Job) Error(err error) (int, error) {
return fmt.Fprintf(job.Stderr, "%s", err)
func (job *Job) Error(err error) Status {
fmt.Fprintf(job.Stderr, "%s", err)
return StatusErr
}

File diff suppressed because it is too large Load Diff