Skip to content

Commit 35bcfdf

Browse files
committed
update README with new public API changes
1 parent f13c94d commit 35bcfdf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

542543
The following is a summary of the non-constructor API functions, grouped by category.
@@ -574,11 +575,15 @@ func RegisterLeafEncoder(typeName TypeKey, encoder LeafEncoder)
574575
func RegisterWrapperDecoder(typeName TypeKey, decoder WrapperDecoder)
575576
func RegisterWrapperEncoder(typeName TypeKey, encoder WrapperEncoder)
576577
func RegisterWrapperEncoderWithMessageOverride (typeName TypeKey, encoder WrapperEncoderWithMessageOverride)
578+
func RegisterMultiCauseEncoder(theType TypeKey, encoder MultiCauseEncoder)
579+
func RegisterMultiCauseDecoder(theType TypeKey, decoder MultiCauseDecoder)
577580
type LeafEncoder = func(ctx context.Context, err error) (msg string, safeDetails []string, payload proto.Message)
578581
type LeafDecoder = func(ctx context.Context, msg string, safeDetails []string, payload proto.Message) error
579582
type WrapperEncoder = func(ctx context.Context, err error) (msgPrefix string, safeDetails []string, payload proto.Message)
580583
type WrapperEncoderWithMessageOverride = func(ctx context.Context, err error) (msgPrefix string, safeDetails []string, payload proto.Message, overrideError bool)
581584
type 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.
584589
func RegisterTypeMigration(previousPkgPath, previousTypeName string, newType error)

0 commit comments

Comments
 (0)