error-chain errors implement Display and Debug and includes some really easy ways to generate formatted descriptions of errors (including errors back up the chain).
I've moved the error display logic into the error definitions so we can take advantages of this, simplifying some of the code as I went. Defining the custom formats is a bit verbose, requiring a newtype etc, there is probably a better place to put it, which I'm thinking about.
error-chain
errors implementDisplay
andDebug
and includes some really easy ways to generate formatted descriptions of errors (including errors back up the chain).I've moved the error display logic into the error definitions so we can take advantages of this, simplifying some of the code as I went. Defining the custom formats is a bit verbose, requiring a newtype etc, there is probably a better place to put it, which I'm thinking about.