app: Show stacktrace on exception when "--debug" is True
Description
When debugging, having the last stacktrace hidden is quite painful. Showing the stacktrace gives much better information both for the reporter and the developer.
Sample output with the change:
with --debug
:
Error loading user configuration:
Traceback (most recent call last):
File "src/buildstream/_yaml.pyx", line 298, in buildstream._yaml.load_data
TypeError: 'NoneType' object is not callable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "src/buildstream/_yaml.pyx", line 275, in buildstream._yaml.load
File "src/buildstream/_yaml.pyx", line 311, in buildstream._yaml.load_data
buildstream._exceptions.LoadError: Severely malformed YAML:
'NoneType' object is not callable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/c/Users/SchubertBenjamin/Documents/projects/buildstream/buildstream/src/buildstream/_frontend/app.py", line 180, in initialized
self.context.load(config)
File "/usr/lib/python3.6/contextlib.py", line 52, in inner
return func(*args, **kwds)
File "/c/Users/SchubertBenjamin/Documents/projects/buildstream/buildstream/src/buildstream/_context.py", line 213, in load
defaults = _yaml.load(_site.default_user_config)
File "src/buildstream/_yaml.pyx", line 257, in buildstream._yaml.load
File "src/buildstream/_yaml.pyx", line 288, in buildstream._yaml.load
buildstream._exceptions.LoadError: /c/Users/SchubertBenjamin/Documents/projects/buildstream/buildstream/src/buildstream/data/userconfig.yaml: Severely malformed YAML:
'NoneType' object is not callable
Without --debug
:
Error loading user configuration: /c/Users/SchubertBenjamin/Documents/projects/buildstream/buildstream/src/buildstream/data/userconfig.yaml: Severely malformed YAML:
'NoneType' object is not callable