Skip to content

blog: doc usage of anyhow! #72

@JosiahParry

Description

@JosiahParry

Since extendr/extendr#973 returning anyhow::Result<> works without any modification.

I think this is a huge quality of life improvement. We can make a patch release with these features and document it?

For example:

use anyhow::bail;
use extendr_api::prelude::*;

#[extendr]
fn can_we_anyhow() -> anyhow::Result<()> {
    bail!("This is an error");
    Ok(())
}

lets us return a nice error

Image

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