Format and marshal any errors in details using Formatter
This could allow one to set cause
detail and get similar behavior than using Wrap
or WrapWith
? But do we check only at top-level? What about slice of errors?
We should then expose all those errors through Unwrap() []error
in that case? But details can be changed after error creation, while having Unwrap() []error
cannot be changed later. So probably this whole approach should be discouraged and not supported.
(For format, parent formatting string should be passed through.)