Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message handling for theme loading failures #5073

Merged

Commits on Dec 8, 2022

  1. Improve error message handling for theme loading failures

    The error messages for a theme that failed to be deserialized (or
    otherwise failed to load) were covered up by the context/with_context
    calls:
    
    * The log message for a bad theme configured in config.toml would only
      say "Failed to deserilaize theme"
    * Selecting a bad theme via :theme would show "Theme does not exist"
    
    With these changes, we let the TOML deserializer errors bubble up, so
    the error messages can now say the line number of a duplicated
    key - and that key's name - when a theme fails to load because of a
    duplicated key.
    
    Providing a theme which does not exist to :theme still gives a helpful
    error message: "No such file or directory."
    the-mikedavis committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    2d5a5db View commit details
    Browse the repository at this point in the history