<div dir="ltr">On Fri, Jul 31, 2015 at 11:16 AM, Christopher Larson <span dir="ltr">&lt;<a href="mailto:kergoth@gmail.com" target="_blank">kergoth@gmail.com</a>&gt;</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 &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;<br>
<br>
Tracebacks are of extremely limited usefulness in this context. The exceptions<br>
carry the necessary context already, and the user doesn&#39;t care about the calls<br>
in bitbake internals that led to an expansion or parse failure.<br>
<br>
Signed-off-by: Christopher Larson &lt;<a href="mailto:chris_larson@mentor.com">chris_larson@mentor.com</a>&gt;</blockquote><div><br></div><div>Example of a parse error:</div><div><br></div><div>    ERROR: Traceback (most recent call last):</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/cookerdata.py&quot;, line 175, in wrapped</div><div>        return func(fn, *args)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/cookerdata.py&quot;, line 185, in parse_config_file</div><div>        return bb.parse.handle(fn, data, include)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/__init__.py&quot;, line 108, in handle</div><div>        return h[&#39;handle&#39;](fn, data, include)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py&quot;, line 155, in handle</div><div>        statements.eval(data)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/ast.py&quot;, line 39, in eval</div><div>        statement.eval(data)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/ast.py&quot;, line 63, in eval</div><div>        bb.parse.ConfHandler.include(self.filename, s, self.lineno, data, False)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py&quot;, line 106, in include</div><div>        raise ParseError(&quot;Error parsing %s: %s&quot; % (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 &quot;/scratch/poky/bitbake/lib/bb/cookerdata.py&quot;, line 175, in wrapped</div><div>        return func(fn, *args)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/cookerdata.py&quot;, line 185, in parse_config_file</div><div>        return bb.parse.handle(fn, data, include)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/__init__.py&quot;, line 108, in handle</div><div>        return h[&#39;handle&#39;](fn, data, include)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py&quot;, line 155, in handle</div><div>        statements.eval(data)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/ast.py&quot;, line 39, in eval</div><div>        statement.eval(data)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/ast.py&quot;, line 63, in eval</div><div>        bb.parse.ConfHandler.include(self.filename, s, self.lineno, data, False)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py&quot;, line 96, in include</div><div>        bb.parse.handle(fn, data, True)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/__init__.py&quot;, line 108, in handle</div><div>        return h[&#39;handle&#39;](fn, data, include)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py&quot;, line 155, in handle</div><div>        statements.eval(data)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/ast.py&quot;, line 39, in eval</div><div>        statement.eval(data)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/parse/ast.py&quot;, line 111, in eval</div><div>        val = e.expand(groupd[&quot;value&quot;], key + &quot;[:=]&quot;)</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/data_smart.py&quot;, line 380, in expand</div><div>        return self.expandWithRefs(s, varname).value</div><div>      File &quot;/scratch/poky/bitbake/lib/bb/data_smart.py&quot;, 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>