Skip to content
This repository has been 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 opened this issue Jan 24, 2020 · 0 comments
Open

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

olvyko opened this issue Jan 24, 2020 · 0 comments

Comments

@olvyko
Copy link

olvyko commented Jan 24, 2020

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);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant