@@ -536,7 +536,8 @@ Example use:
536536| ` WrapWithDepthf` | ` WithMessagef` + ` WithStackDepth` |
537537| ` AssertionFailedWithDepthf` | ` NewWithDepthf` + ` WithAssertionFailure` |
538538| ` NewAssertionErrorWithWrappedErrf` | ` HandledWithMessagef` (barrier) + ` WrapWithDepthf` + ` WithAssertionFailure` |
539-
539+ | ` Join` | ` JoinWithDepth` (see below) |
540+ | ` JoinWithDepth` | multi-cause wrapper + ` WithStackDepth` |
540541## API (not constructing error objects)
541542
542543The following is a summary of the non-constructor API functions, grouped by category.
@@ -574,11 +575,15 @@ func RegisterLeafEncoder(typeName TypeKey, encoder LeafEncoder)
574575func RegisterWrapperDecoder(typeName TypeKey, decoder WrapperDecoder)
575576func RegisterWrapperEncoder(typeName TypeKey, encoder WrapperEncoder)
576577func RegisterWrapperEncoderWithMessageOverride (typeName TypeKey, encoder WrapperEncoderWithMessageOverride)
578+ func RegisterMultiCauseEncoder(theType TypeKey, encoder MultiCauseEncoder)
579+ func RegisterMultiCauseDecoder(theType TypeKey, decoder MultiCauseDecoder)
577580type LeafEncoder = func(ctx context.Context, err error) (msg string, safeDetails []string, payload proto.Message)
578581type LeafDecoder = func(ctx context.Context, msg string, safeDetails []string, payload proto.Message) error
579582type WrapperEncoder = func(ctx context.Context, err error) (msgPrefix string, safeDetails []string, payload proto.Message)
580583type WrapperEncoderWithMessageOverride = func(ctx context.Context, err error) (msgPrefix string, safeDetails []string, payload proto.Message, overrideError bool)
581584type WrapperDecoder = func(ctx context.Context, cause error, msgPrefix string, safeDetails []string, payload proto.Message) error
585+ type MultiCauseEncoder = func(ctx context.Context, err error) (msg string, safeDetails []string, payload proto.Message)
586+ type MultiCauseDecoder = func(ctx context.Context, causes []error, msgPrefix string, safeDetails []string, payload proto.Message) error
582587
583588// Registering package renames for custom error types.
584589func RegisterTypeMigration(previousPkgPath, previousTypeName string, newType error)
0 commit comments