jmacd opened a new issue, #41988:
URL: https://github.com/apache/arrow/issues/41988
### Describe the enhancement requested
There are a few locations where the Go Arrow library recovers a panic and
formats the recovered object with `fmt.Errorf("...: %v", ..., recovered).
When the recovered object is an error, it should use the "%w" syntax to
indicate a wrapped error. With this functional change, allocators can
effectively panic and recover a wrapped error to signal errors as requested in
https://github.com/apache/arrow/issues/36186.
The OTel-Arrow project encountered this problem and has resorted to regexp
parsing of the formatted error to unwrap errors thrown from an Allocator. See
https://github.com/open-telemetry/otel-arrow/pull/215 where we resolved this.
The solution is to type-switch and use %w for errors, %v for everything
else. The code already does this in some places, but not consistently.
### Component(s)
Go
--
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]