handling context timeout/cancelled in printer package

This commit is contained in:
Julien Neuhart
2019-07-09 19:39:14 +02:00
parent 957b9b1cf4
commit c7ecdcf625
9 changed files with 81 additions and 61 deletions

View File

@@ -41,7 +41,7 @@ func (p *merge) Print(destination string) error {
cmd := exec.CommandContext(p.ctx, "pdftk", cmdArgs...)
_, err := cmd.Output()
if err != nil {
return &standarderror.Error{Op: op, Err: err}
return handleErrContext(p.ctx, &standarderror.Error{Op: op, Err: err})
}
return nil
}