Skip to content

Better handle exceptions catchs #65

Description

@OutSquareCapital

Currently, try:...except:... blocks are still needed to catch exceptions and wrap them in Err. We should find an API design that allows us to completely avoid this.

The issue with a simple func f(Callable[[T], R], *exceptions: E) -> Result[T,E] is that this don't allow ParamSpec to be used here, making the API not convenient on many cases.

A builder in two step could be an idea.

But how to implement a try catch in Rust?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions