job.error\* now return engine.StatusErr

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
This commit is contained in:
Victor Vieux 2014-01-28 00:27:02 +00:00
parent 2b52d6e801
commit 24086fa75d
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
}

446
server.go

File diff suppressed because it is too large Load Diff