Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

[FEATURE REQUEST] Add ability to bail! and ensure! error types.  #341

Open
@olvyko

Description

@olvyko

Today u can only bail! and ensure! error message (&str).
I suggest adding the ability to return structs and enums that implement Fail trait.

Today:

bail!("error message");
ensure!(false, "error message");

Could be:

bail!(ErrorKind::SomeError);
ensure!(false, ErrorKind::SomeError);

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