Browse code

graph: enhance err message on failed image restore

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
(cherry picked from commit f5fc832b6e786bbcd7dfe98b1ec04b8b8d1935ae)

Antonio Murdaca authored on 2015/11/02 18:10:23
Showing 1 changed files
... ...
@@ -182,7 +182,7 @@ func (graph *Graph) restore() error {
182 182
 		if graph.driver.Exists(id) {
183 183
 			img, err := graph.loadImage(id)
184 184
 			if err != nil {
185
-				return err
185
+				return fmt.Errorf("could not restore image %s: %v", id, err)
186 186
 			}
187 187
 			graph.imageMutex.Lock(img.Parent)
188 188
 			graph.parentRefs[img.Parent]++