Commits


Wes McKinney authored and Uwe L. Korn committed 81be9c66794
ARROW-866: [Python] Be robust to PyErr_Fetch returning a null exc value cc @BryanCutler. This was a tricky one. I am not sure how to reproduce with our current code -- I reverted the patch from ARROW-822 to get a reproduction so I could fix this. Now, the error raised is: ``` /home/wesm/code/arrow/python/pyarrow/_error.pyx in pyarrow._error.check_status (/home/wesm/code/arrow/python/build/temp.linux-x86_64-2.7/_error.cxx:1324)() 58 raise ArrowInvalid(message) 59 elif status.IsIOError(): ---> 60 raise ArrowIOError(message) 61 elif status.IsOutOfMemory(): 62 raise ArrowMemoryError(message) ArrowIOError: IOError: Error message was null ``` I'm not sure why calling `tell` on the socket object results in a bad exception state, but in any case it seems that the result of `PyErr_Fetch` cannot be relied upon to be non-null even when `PyErr_Occurred()` returns non-null Author: Wes McKinney <wes.mckinney@twosigma.com> Closes #606 from wesm/ARROW-866 and squashes the following commits: fa395cd [Wes McKinney] Enable other kinds of Status errors to be returned 0bd11c2 [Wes McKinney] Consolidate error handling code a bit 9d59dd2 [Wes McKinney] Be robust to PyErr_Fetch returning a null exc value