Skip to content
This repository was archived by the owner on Oct 9, 2018. It is now read-only.

Error handling #33

Open
FranklinChen opened this issue Sep 25, 2014 · 2 comments
Open

Error handling #33

FranklinChen opened this issue Sep 25, 2014 · 2 comments

Comments

@FranklinChen
Copy link

Are there any plans to provide standard layers of error handling mechanism for Rust over raw Result, or any interest in contributions? For example, I have hand-rolled a specialized equivalent of Scala/Haskell idiomatic validation for my own use, in which I accumulate errors in a Result<T, Vec<E>> (using another monoid is of course possible).

@aturon
Copy link
Member

aturon commented Sep 25, 2014

You might have a look at the error interoperation RFC, which has essentially been accepted (modulo some final details). I suspect that doesn't completely cover what you have in mind, though.

What the RFC does do, though, is start treating errors as a first-class concept in Rust's standard library, by introducing an Error trait. The library support around this trait will likely grow over time.

In general, now that we have Cargo, we prefer for this kind of thing to be started as a public, experimental Cargo crate. If it appears widely useful/used over time, then we'll bring it into the "official" standard library.

@FranklinChen
Copy link
Author

Thanks, I will study the discussions and see if there is someone's project I can contribute to, or put up my own.

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

2 participants