cockroachdb / errors

Go error library with error portability over the network
Apache License 2.0
2.04k stars 66 forks source link

markers: avoid panic on non-comparable structs #98

Closed knz closed 1 year ago

knz commented 1 year ago

Found while investigating https://github.com/cockroachdb/cockroach/issues/87555

If an error struct implements error by value and the struct is incomparable, the previous implementation of Is would panic. This patch fixes it.

Inspired from https://go-review.googlesource.com/c/go/+/175260


This change is Reviewable