Skip to content

Improve error handling in wezterm plugins and event handlers #74

@mrolli

Description

@mrolli

Is your feature request related to a current shortcoming? Please describe.
Currently, the wezterm configuration lacks error handling when calling plugin functions and event handlers. If a plugin fails or returns unexpected values (e.g., nil), it could cause issues in the status bar rendering.

Describe the solution you'd like

  • Add error handling with pcall() around plugin calls
  • Handle nil values returned by plugins (e.g., trackinfo on non-Darwin platforms)
  • Filter out nil values before building status bar cells
  • Add defensive checks in event handlers
  • Consider logging errors for debugging

Additional context
This will make the configuration more robust and prevent crashes when plugins encounter errors or unsupported platforms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions