From d7e9d2acda2e7a04390acec86f67f4fa9d732fa9 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 30 Jul 2016 18:22:11 -0400 Subject: Check for error in ghostscript example --- contrib/ghostscript/ghostscript.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'contrib/ghostscript') diff --git a/contrib/ghostscript/ghostscript.go b/contrib/ghostscript/ghostscript.go index 2b695b8..3196c34 100644 --- a/contrib/ghostscript/ghostscript.go +++ b/contrib/ghostscript/ghostscript.go @@ -51,8 +51,12 @@ func min(name string) { go func() { errChan <- cmd.Start() }() - newPdf().Output(inPipe) - report(name, <-errChan) + err = newPdf().Output(inPipe) + if err == nil { + report(name, <-errChan) + } else { + report(name, err) + } } else { report(name, err) } -- cgit v1.2.1-24-ge1ad