New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add richer error-handling constructs #434

Open
aturon opened this Issue Nov 3, 2014 · 3 comments

Comments

Projects
None yet
5 participants
@aturon
Member

aturon commented Nov 3, 2014

The trait-based exception handling RFC was postponed for the 1.0 timeframe, but the core team and broader community are generally in favor of this design. We hope to revisit it shortly after the release candidate is produced.

@mitsuhiko

This comment has been minimized.

Show comment
Hide comment
@mitsuhiko

mitsuhiko Nov 5, 2014

Contributor

Is there a chance we could see a fail! macro before 1.0 that does what the error part of the try! macro does at least? The FromError trait is really convenient but currently it feels very much like something like fail! needs to be added.

Eg:

macro_rules! fail {
    ($expr:expr) => (
        return Err(::std::error::FromError::from_error($expr));
    )
}
Contributor

mitsuhiko commented Nov 5, 2014

Is there a chance we could see a fail! macro before 1.0 that does what the error part of the try! macro does at least? The FromError trait is really convenient but currently it feels very much like something like fail! needs to be added.

Eg:

macro_rules! fail {
    ($expr:expr) => (
        return Err(::std::error::FromError::from_error($expr));
    )
}
@arthurprs

This comment has been minimized.

Show comment
Hide comment
@arthurprs

arthurprs Nov 6, 2014

fail! is a nice complement to try! +1 on that

arthurprs commented Nov 6, 2014

fail! is a nice complement to try! +1 on that

@johanfange

This comment has been minimized.

Show comment
Hide comment
@johanfange

johanfange Nov 9, 2014

What about stack traces? Stack traces are immensely useful for diagnosing errors in large long-running applications.

Or is that an orthogonal feature?

johanfange commented Nov 9, 2014

What about stack traces? Stack traces are immensely useful for diagnosing errors in large long-running applications.

Or is that an orthogonal feature?

@petrochenkov petrochenkov added the T-lang label Jan 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment