I know not everyone is into "failure", but I think it's fantastic! Backtraces. Explanations. Blanket wrappers for all error types. I like how it allows non-experts to create a good error handling story in Rust :D https://boats.gitlab.io/failure/fail.html …
-
-
Oh actually, I guess all we need is a single macro to match (inner) Error enums + (outer) Error structs and we should be good! Okay; excited that this is possible! Probably the other thing that would be brilliant would be a way to match these back to `ensure!()` statements.
Show this thread -
Oh, don't think I've talked about `ensure!()` at all. It's the Result equivalent of `assert!()`. So if you think of assert as "panic if this conditional is false", you can think of ensure as "return an Error if this conditional is false". One line error handling is great!
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.