Skip to content

Remove anyhow from API surface area #15

@khionu

Description

@khionu

Returning anyhow::Errors, as well as any other opaque error struct, makes it hard to consume a library. Beyond having no recourse but to pass the failure up, it creates issues integrating with other error crates, such as eyre or miette.

anyhow is meant to be used by applications, not libraries, which is why the same author as anyhow made thiserror. That said, I would recommend using snafu, which can provide the functionalities of both anyhow and thiserror. It's still prudent to create a custom error type in the fashion of thiserror, but snafu provides comparable tooling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions