failure icon indicating copy to clipboard operation
failure copied to clipboard

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

Open olvyko opened this issue 6 years ago • 0 comments

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);

olvyko avatar Jan 24 '20 09:01 olvyko