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 217ad5e5e6
commit 55d7aa1b49
2 changed files with 156 additions and 306 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
}

452
server.go

File diff suppressed because it is too large Load Diff