WithDetails returns the error with the given details set. This appends to any existing details in the Error.
(details ...proto.Message)
| 35 | // WithDetails returns the error with the given details set. |
| 36 | // This appends to any existing details in the Error. |
| 37 | func (e *Error) WithDetails(details ...proto.Message) *Error { |
| 38 | if e == nil { |
| 39 | return e |
| 40 | } |
| 41 | dup := *e |
| 42 | dup.addDetails(details...) |
| 43 | return &dup |
| 44 | } |
| 45 | |
| 46 | // WithDetails returns a new error from the definition, and sets the given details. |
| 47 | func (d *Definition) WithDetails(details ...proto.Message) *Error { |