zeroshade commented on code in PR #12960:
URL: https://github.com/apache/arrow/pull/12960#discussion_r856424471


##########
go/internal/utils/buf_reader.go:
##########
@@ -71,16 +78,17 @@ func (b *bufferedReader) fill() {
        }
 
        if b.w >= len(b.buf) {
-               panic("parquet/bufio: tried to fill full buffer")
+               return fmt.Errorf("arrow/bufferedreader: %w", 
bufio.ErrBufferFull)

Review Comment:
   they are different functionality. `errors.New` creates a new error from a 
single string. I'm using `fmt.Errorf` when I'm wrapping an error so that 
callers can still use `errors.Is(err, bufio.ErrBufferFull)` or otherwise to 
handle the errors



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to