Commits


Will Jones authored and GitHub committed 6fe7480125b
GH-37164: [Python] Attach Python stacktrace to errors in `ConvertPyError` (#39380) ### Rationale for this change Users might define Python generators that are used in RecordBatchReaders and then exported through the C Data Interface. However, if an error occurs in their generator, the stacktrace and message are currently swallowed in the current `ConvertPyError` implementation, which only provides the type of error. This makes debugging code that passed RBRs difficult. ### What changes are included in this PR? Changes `ConvertPyError` to provide the fully formatted traceback in the error message. ### Are these changes tested? Yes, added one test to validate the errors messages are propagated. ### Are there any user-facing changes? This is a minor change in the error reporting behavior, which will provide more information. * Closes: #37164 Authored-by: Will Jones <willjones127@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>