Coverage for qutebrowser/config/configexc.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # qutebrowser is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
"""Base exception for config-related errors."""
"""Raised when this setting is unavailable with the current backend."""
"backend!".format(name, backend.name))
"""Raised when a value for a config type was invalid.
Attributes: value: Config value that triggered the error. msg: Additional error message. """
"""Raised for issues with keybindings."""
"""Raised when an option was not found."""
else:
class ConfigErrorDesc:
"""A description of an error happening while reading the config.
Attributes: text: The text to show. exception: The exception which happened. traceback: The formatted traceback of the exception. """
self.exception.__class__.__name__, self.exception)
"""Get a new ConfigErrorDesc with the given text appended.""" exception=self.exception, traceback=self.traceback)
"""Raised when multiple errors occurred inside the config."""
basename, '\n'.join(' {}'.format(e) for e in errors)))
"""Get the error texts as a HTML snippet.""" Errors occurred while reading {{ basename }}:
<ul> {% for error in errors %} <li> <b>{{ error.text }}</b>: {{ error.exception }} {% if error.traceback != none %} <pre> """.rstrip() + "\n{{ error.traceback }}" + """ </pre> {% endif %} </li> {% endfor %} </ul> """) |