From 6ae5936de9c3aa05583736138e8be6447adcdd0c Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Mon, 24 Aug 2015 10:58:46 +0200 Subject: [PATCH] Be more verbose if image decoding failed. --- common/image.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/image.go b/common/image.go index 69c43fa..226b83f 100644 --- a/common/image.go +++ b/common/image.go @@ -93,14 +93,13 @@ func LoadPNG(path string) image.Image { var err error var file *os.File if file, err = os.Open(path); err != nil { - //log.Printf("WARN: %s\n", err) return image.White } defer file.Close() reader := bufio.NewReader(file) var img image.Image if img, err = png.Decode(reader); err != nil { - log.Printf("WARN: %s\n", err) + log.Printf("WARN: decoding '%s' failed: %s\n", path, err) return image.White } return img