RegisterMultiCauseDecoder can be used to register new multi-cause wrapper types to the library. Registered wrappers will be decoded using their own Go type when an error is decoded. Multi-cause wrappers that have not been registered will be decoded using the opaqueWrapper type.
(theType TypeKey, decoder MultiCauseDecoder)
| 198 | // wrappers that have not been registered will be decoded using the |
| 199 | // opaqueWrapper type. |
| 200 | func RegisterMultiCauseDecoder(theType TypeKey, decoder MultiCauseDecoder) { |
| 201 | if decoder == nil { |
| 202 | delete(multiCauseDecoders, theType) |
| 203 | } else { |
| 204 | multiCauseDecoders[theType] = decoder |
| 205 | } |
| 206 | } |
no outgoing calls
searching dependent graphs…