diff options
author | Florian Bruhin <me@the-compiler.org> | 2019-07-04 09:28:49 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2019-07-04 09:28:49 +0200 |
commit | 70d27ce7fd644e8588fb481ff62798024d888ad1 (patch) | |
tree | 8d9b29ddfa6d6f19d76f3bddeb7916245232d29a | |
parent | 012f11ab31146f4fce9a5d9fc67c5ef86986d90a (diff) | |
download | qutebrowser-70d27ce7fd644e8588fb481ff62798024d888ad1.tar.gz qutebrowser-70d27ce7fd644e8588fb481ff62798024d888ad1.zip |
Log traceback for config errors
When we display the error graphically, we show the traceback. In tests however,
we don't see the traceback anywhere, so let's add it to the debug logs.
-rw-r--r-- | qutebrowser/config/configexc.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qutebrowser/config/configexc.py b/qutebrowser/config/configexc.py index 9f53847cb..df171c365 100644 --- a/qutebrowser/config/configexc.py +++ b/qutebrowser/config/configexc.py @@ -22,7 +22,7 @@ import typing import attr -from qutebrowser.utils import jinja, usertypes +from qutebrowser.utils import jinja, usertypes, log class Error(Exception): @@ -146,6 +146,10 @@ class ConfigFileErrors(Error): basename, '\n'.join(' {}'.format(e) for e in errors))) self.basename = basename self.errors = errors + for err in errors: + if err.traceback: + log.config.debug("Config error stack:") + log.config.debug(err.traceback) def to_html(self) -> str: """Get the error texts as a HTML snippet.""" |