Skip to content

Commit

Permalink
changefeedccl: Change unreachable panic to unreachable error
Browse files Browse the repository at this point in the history
I missed the context but apparently we're doing this everywhere we can.

Release note: None
  • Loading branch information
HonoreDB committed Jul 29, 2021
1 parent 740ae3d commit 6c1d2e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/ccl/changefeedccl/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,11 +573,11 @@ func (e *confluentAvroEncoder) register(
type nativeEncoder struct{}

func (e *nativeEncoder) EncodeKey(ctx context.Context, row encodeRow) ([]byte, error) {
panic("EncodeKey should not be called on nativeEncoder")
return nil, errors.New("EncodeKey unexpectedly called on nativeEncoder")
}

func (e *nativeEncoder) EncodeValue(ctx context.Context, row encodeRow) ([]byte, error) {
panic("EncodeValue should not be called on nativeEncoder")
return nil, errors.New("EncodeValue unexpectedly called on nativeEncoder")
}

func (e *nativeEncoder) EncodeResolvedTimestamp(
Expand Down

0 comments on commit 6c1d2e7

Please sign in to comment.