[FEATURE REQUEST] Add ability to `bail!` and `ensure!` error types.
olvyko opened this issue · comments
Oleksii Knyshenko commented
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);