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

feat: readable toml parsing error #854

Merged
merged 2 commits into from
Mar 31, 2024
Merged

feat: readable toml parsing error #854

merged 2 commits into from
Mar 31, 2024

Commits on Mar 31, 2024

  1. feat: readable toml parsing error

    Previously, the yazi displayed the following error.
    ```
    Backtrace omitted. Run with RUST_BACKTRACE=1 to display it.
    Run with RUST_BACKTRACE=full to include source snippets.
    
    The application panicked (crashed).
      called `Result::unwrap()` on an `Err` value: Error { inner: Error { inner: TomlError { message: "invalid key", raw: Some("{ mime = \"application/octet-stream\",\nuse = [ \"extract_zlib\", \"reveal\" ] }\n"), keys: [], span: Some(0..1) } } }
    in yazi-config/src/preset.rs, line 42
    thread: main
    ```
    
    It now displays the following message instead:
    
    ```
    Error: Loading "/home/solo/.config/yazi/yazi.toml"
    
    Caused by:
        TOML parse error at line 1, column 1
          |
        1 | { mime = "application/octet-stream",
          | ^
        invalid key
    ```
    
    For more information see issue sxyaziGH-847.
    SoloJacobs committed Mar 31, 2024
    Configuration menu
    Copy the full SHA
    82a3a57 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f32d830 View commit details
    Browse the repository at this point in the history