From bb81db6f619b1b17661e0f0a637988a6225b40a6 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 30 May 2012 17:17:16 +0100 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bitbake') 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): logger.error('Unable to parse %s: %s' % (exc.recipe, bb.exceptions.to_string(exc.realexception))) self.shutdown(clean=False) - except (bb.parse.ParseError, bb.data_smart.ExpansionError) as exc: + except bb.parse.ParseError as exc: logger.error(str(exc)) self.shutdown(clean=False) + except bb.data_smart.ExpansionError as exc: + _, value, _ = sys.exc_info() + logger.error('ExpansionError during parsing %s: %s', value.recipe, str(exc)) + self.shutdown(clean=False) except SyntaxError as exc: logger.error('Unable to parse %s', exc.recipe) self.shutdown(clean=False) -- cgit v1.2.3-54-g00ecf