diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-05-30 17:17:16 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 17:23:31 +0100 |
commit | bb81db6f619b1b17661e0f0a637988a6225b40a6 (patch) | |
tree | 701de592df37847a2be0abc82ef9bbaa9749a1d1 | |
parent | f0809ed7886f41969e1eaa5b9ec831882dd11fd3 (diff) | |
download | poky-bb81db6f619b1b17661e0f0a637988a6225b40a6.tar.gz |
cooker: report recipe being parsed when ExpansionError occurs
When an ExpansionError occurs during parsing it is useful to know which
recipe was being parsed when it occurred.
(Bitbake rev: a2a8e8c9f5a1a30aacab696fd2b434939ee2c4e2)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/cooker.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index b30945c4b0..928b6009aa 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -1657,9 +1657,13 @@ class CookerParser(object): | |||
1657 | logger.error('Unable to parse %s: %s' % | 1657 | logger.error('Unable to parse %s: %s' % |
1658 | (exc.recipe, bb.exceptions.to_string(exc.realexception))) | 1658 | (exc.recipe, bb.exceptions.to_string(exc.realexception))) |
1659 | self.shutdown(clean=False) | 1659 | self.shutdown(clean=False) |
1660 | except (bb.parse.ParseError, bb.data_smart.ExpansionError) as exc: | 1660 | except bb.parse.ParseError as exc: |
1661 | logger.error(str(exc)) | 1661 | logger.error(str(exc)) |
1662 | self.shutdown(clean=False) | 1662 | self.shutdown(clean=False) |
1663 | except bb.data_smart.ExpansionError as exc: | ||
1664 | _, value, _ = sys.exc_info() | ||
1665 | logger.error('ExpansionError during parsing %s: %s', value.recipe, str(exc)) | ||
1666 | self.shutdown(clean=False) | ||
1663 | except SyntaxError as exc: | 1667 | except SyntaxError as exc: |
1664 | logger.error('Unable to parse %s', exc.recipe) | 1668 | logger.error('Unable to parse %s', exc.recipe) |
1665 | self.shutdown(clean=False) | 1669 | self.shutdown(clean=False) |