summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/pdfbook/main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/pdfbook/main.go b/cmd/pdfbook/main.go
index 6532f26..9f97543 100644
--- a/cmd/pdfbook/main.go
+++ b/cmd/pdfbook/main.go
@@ -2,6 +2,7 @@ package main
import (
"bufio"
+ "errors"
"flag"
"fmt"
"log"
@@ -82,7 +83,7 @@ func addBest(dir string, pdf Pdfer, colour, smaller bool) error {
img := imgPath(hocrpath, colour)
err := pdf.AddPage(img, hocrpath, smaller)
if err != nil {
- return err
+ return errors.New(fmt.Sprintf("Failed to add page %s: %v", f, err))
}
}
return nil