Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Reference description in display #234

Open
kc1212 opened this issue Oct 18, 2017 · 0 comments
Open

Reference description in display #234

kc1212 opened this issue Oct 18, 2017 · 0 comments

Comments

@kc1212
Copy link

kc1212 commented Oct 18, 2017

Hi, is it possible to get a reference to the description string in error_chain? I want to do the following for example:

error_chain!{
    errors {
        Foo(details: String) {
            description("foo happened")
            display("{}: {}", description, details) // description should be what is in description(..) above
        }
    }
}
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

1 participant