Commit 33917e8f authored by Mustafa Emre Acer's avatar Mustafa Emre Acer Committed by Commit Bot

Add filename to grit exception

This is helpful when debugging grd exceptions.

Change-Id: Ib78d6bf75bed82d98b6e8bdceff97a9c8fa03dd1
Reviewed-on: https://chromium-review.googlesource.com/c/1482131Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#634526}
parent 37b3069e
...@@ -88,7 +88,7 @@ class GrdContentHandler(xml.sax.handler.ContentHandler): ...@@ -88,7 +88,7 @@ class GrdContentHandler(xml.sax.handler.ContentHandler):
partname = os.path.join(self.dir, partnode.GetInputPath()) partname = os.path.join(self.dir, partnode.GetInputPath())
# Check the GRDP file exists. # Check the GRDP file exists.
if not os.path.exists(partname): if not os.path.exists(partname):
raise exception.FileNotFound() raise exception.FileNotFound(partname)
# Exceptions propagate to the handler in grd_reader.Parse(). # Exceptions propagate to the handler in grd_reader.Parse().
oldsource = self.source oldsource = self.source
try: try:
...@@ -110,7 +110,8 @@ class GrdContentHandler(xml.sax.handler.ContentHandler): ...@@ -110,7 +110,8 @@ class GrdContentHandler(xml.sax.handler.ContentHandler):
self.stack[-1].AppendContent(content) self.stack[-1].AppendContent(content)
def ignorableWhitespace(self, whitespace): def ignorableWhitespace(self, whitespace):
# TODO(joi) This is not supported by expat. Should use a different XML parser? # TODO(joi): This is not supported by expat. Should use a different XML
# parser?
pass pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment