diff --git a/qutebrowser/config/configfiles.py b/qutebrowser/config/configfiles.py index 692474075..3dccc129f 100644 --- a/qutebrowser/config/configfiles.py +++ b/qutebrowser/config/configfiles.py @@ -419,7 +419,7 @@ def read_config_py(filename, raising=False): desc = configexc.ConfigErrorDesc("Error while compiling", e) raise configexc.ConfigFileErrors(basename, [desc]) except SyntaxError as e: - desc = configexc.ConfigErrorDesc("Syntax Error", e, + desc = configexc.ConfigErrorDesc("Unhandled exception", e, traceback=traceback.format_exc()) raise configexc.ConfigFileErrors(basename, [desc]) diff --git a/tests/unit/config/test_configfiles.py b/tests/unit/config/test_configfiles.py index 341fad689..06633ffc7 100644 --- a/tests/unit/config/test_configfiles.py +++ b/tests/unit/config/test_configfiles.py @@ -550,7 +550,7 @@ class TestConfigPy: assert len(excinfo.value.errors) == 1 error = excinfo.value.errors[0] assert isinstance(error.exception, SyntaxError) - assert error.text == "Syntax Error" + assert error.text == "Unhandled exception" exception_text = 'invalid syntax (config.py, line 1)' assert str(error.exception) == exception_text