Skip to content

Proper Error Handling#290

Merged
prokopyl merged 20 commits into
nextfrom
hunting-unwraps
Jul 15, 2026
Merged

Proper Error Handling#290
prokopyl merged 20 commits into
nextfrom
hunting-unwraps

Conversation

@prokopyl

@prokopyl prokopyl commented Jul 12, 2026

Copy link
Copy Markdown
Member

This PR removes many (many (many)) cases of panics and unwrap()s within baseview, and replaces them with proper error handling:

  • Add a new generic, opaque Error for all window-related operations.
  • Add a new HandlerError that can coalesce any error type, to be returned in WindowHandler methods.
  • WindowHandler::on_frame can now return errors, which will properly destroy the window if they do.
  • WindowHandler::resized can now return errors, which will revert the resize operation if they do.
  • create_window now returns a Result, and the WindowHandler builder it takes is now also fallible.
  • Many methods on WindowContext now return an Error when they fail, instead of panicking.

@prokopyl prokopyl changed the title Hunting unwraps Proper error Handling Jul 12, 2026
@prokopyl
prokopyl marked this pull request as draft July 13, 2026 06:12
@prokopyl prokopyl changed the title Proper error Handling Proper Error Handling Jul 15, 2026
@prokopyl
prokopyl marked this pull request as ready for review July 15, 2026 22:35
@prokopyl
prokopyl merged commit 3773bef into next Jul 15, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant