error-chain icon indicating copy to clipboard operation
error-chain copied to clipboard

Reference description in display

Open kc1212 opened this issue 7 years ago • 0 comments

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
        }
    }
}

kc1212 avatar Oct 18 '17 08:10 kc1212