<div dir="ltr">On Fri, Jul 31, 2015 at 11:16 AM, Christopher Larson <span dir="ltr"><<a href="mailto:kergoth@gmail.com" target="_blank">kergoth@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>><br>
<br>
Tracebacks are of extremely limited usefulness in this context. The exceptions<br>
carry the necessary context already, and the user doesn't care about the calls<br>
in bitbake internals that led to an expansion or parse failure.<br>
<br>
Signed-off-by: Christopher Larson <<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>></blockquote><div><br></div><div>Example of a parse error:</div><div><br></div><div> ERROR: Traceback (most recent call last):</div><div> File "/scratch/poky/bitbake/lib/bb/cookerdata.py", line 175, in wrapped</div><div> return func(fn, *args)</div><div> File "/scratch/poky/bitbake/lib/bb/cookerdata.py", line 185, in parse_config_file</div><div> return bb.parse.handle(fn, data, include)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/__init__.py", line 108, in handle</div><div> return h['handle'](fn, data, include)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 155, in handle</div><div> statements.eval(data)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/ast.py", line 39, in eval</div><div> statement.eval(data)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/ast.py", line 63, in eval</div><div> bb.parse.ConfHandler.include(self.filename, s, self.lineno, data, False)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 106, in include</div><div> raise ParseError("Error parsing %s: %s" % (fn, exc.strerror), parentfn, lineno)</div><div> ParseError: ParseError at /scratch/poky/meta/conf/bitbake.conf:679: Error parsing /scratch/build/conf/local.conf: Permission denied</div><div><br></div><div>ERROR: Unable to parse conf/bitbake.conf: ParseError at /scratch/poky/meta/conf/bitbake.conf:679: Error parsing /scratch/build/conf/local.</div><div>conf: Permission denied</div><div><br></div><div>Example of an expansion error:</div><div><br></div><div> ERROR: Traceback (most recent call last):</div><div> File "/scratch/poky/bitbake/lib/bb/cookerdata.py", line 175, in wrapped</div><div> return func(fn, *args)</div><div> File "/scratch/poky/bitbake/lib/bb/cookerdata.py", line 185, in parse_config_file</div><div> return bb.parse.handle(fn, data, include)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/__init__.py", line 108, in handle</div><div> return h['handle'](fn, data, include)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 155, in handle</div><div> statements.eval(data)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/ast.py", line 39, in eval</div><div> statement.eval(data)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/ast.py", line 63, in eval</div><div> bb.parse.ConfHandler.include(self.filename, s, self.lineno, data, False)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 96, in include</div><div> bb.parse.handle(fn, data, True)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/__init__.py", line 108, in handle</div><div> return h['handle'](fn, data, include)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py", line 155, in handle</div><div> statements.eval(data)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/ast.py", line 39, in eval</div><div> statement.eval(data)</div><div> File "/scratch/poky/bitbake/lib/bb/parse/ast.py", line 111, in eval</div><div> val = e.expand(groupd["value"], key + "[:=]")</div><div> File "/scratch/poky/bitbake/lib/bb/data_smart.py", line 380, in expand</div><div> return self.expandWithRefs(s, varname).value</div><div> File "/scratch/poky/bitbake/lib/bb/data_smart.py", line 370, in expandWithRefs</div><div> raise ExpansionError(varname, s, exc)</div><div> ExpansionError: Failure expanding variable FOO[:=], expression was ${@alpha beta theta} which triggered exception SyntaxError: invalid syntax (FOO[:=], line 1)</div><div><br></div><div> ERROR: Unable to parse conf/bitbake.conf: Failure expanding variable FOO[:=], expression was ${@alpha beta theta} which triggered exception SyntaxError: invalid syntax (FOO[:=]</div><div> , line 1)</div><div> </div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div></div>
</div></div>