BmapCopy: improve XML parsing error message
When BmapCopy fails to parse the XML file, it prints something like this:
bmaptool: ERROR: cannot parse the bmap file '/home/dedekind/tmp/Fedora-19-i386-CHECKSUM' which should be a proper XML file: not well-formed (invalid token): line 1, column 1
(yes, I deliberately fed bmaptool a bogus file)
The problem is that sometimes we actually modify the bmap file a bit before
parsing. For example, we do this when the bmap file is signed with a clearsign
OpenPGP signature.
This means that the line number does not match the file name we print. This
patch improves the situation by providing the bogus line number and a bit of
the context in the exception error message.
Change-Id: I62b8aefde4a3ea524f528b83c4b6e70fa469e387
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>