Skip to content
Discussion options

You must be logged in to vote

thiserror gives me a lot of trouble and it's something on the list of things to change, and even though I have some ideas myself on how that could be done, error_set should be the right step to take to ease the pain.

Agreed definitively a motivation that led me to create this crate.

What happens if two errors use the same variant name but store different data.

If two errors use the same variant name but store different data || only includes the first one that occupies that space - || works like an "or" operation for the set space.

error_set::error_set! {
    Error1 = {
        Variant(std::io::Error),
    };
    Error2 = {
        Variant(std::fmt::Error),
    };
    Error3 = Error1 || 

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Byron
Comment options

@Byron
Comment options

@mcmah309
Comment options

@Byron
Comment options

@mcmah309
Comment options

Answer selected by Byron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants