From: Artem Bityutskiy Date: Wed, 19 Dec 2012 13:07:59 +0000 (+0200) Subject: BmapCopy: make error message more verbose X-Git-Tag: v2.0~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f825fd6f648f7969b0de5420ec2a38dc7e1fbed;p=tools%2Fbmap-tools.git BmapCopy: make error message more verbose Print all file names in case of short read/write error. Change-Id: If86e676541371d246f4202a736604d4024cbe6b6 Signed-off-by: Artem Bityutskiy --- diff --git a/bmaptools/BmapCopy.py b/bmaptools/BmapCopy.py index 94a572c..9693c7d 100644 --- a/bmaptools/BmapCopy.py +++ b/bmaptools/BmapCopy.py @@ -447,8 +447,10 @@ class BmapCopy: # This is just a sanity check - we should have written exactly # 'mapped_cnt' blocks. if blocks_written != self.mapped_cnt: - raise Error("wrote %u blocks, but should have %u - inconsistent " \ - "bmap file" % (blocks_written, self.mapped_cnt)) + raise Error("wrote %u blocks from image '%s' to '%s', but should " \ + "have %u - inconsistent bmap file '%s'" \ + % (blocks_written, self._image_path, self._dest_path, \ + self.mapped_cnt, self._bmap_path)) if self._dest_is_regfile: # Make sure the destination file has the same size as the image