mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-02-06 18:40:55 +00:00
This adds package errors, which provides error handling constructs that are specific to the protobuf repo. In particular, it provides a NonFatal type which is useful for capturing non-fatal errors like invalid UTF-8 and required fields not set. High-level API: type NonFatalErrors []error func (NonFatalErrors) Error() string type NonFatal struct{ ... } func (*NonFatal) Merge(err error) (ok bool) func (*NonFatal) AppendInvalidUTF8(field string) func (*NonFatal) AppendRequiredNotSet(field string) func New(string, ...interface{}) error Change-Id: I9448c586008240e8987573fe79e0ffb024e7629d Reviewed-on: https://go-review.googlesource.com/127338 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Herbie Ong <herbie@google.com>