When one of the ManagedRandomAccessFile methods called from C++ caused an OutOfMemoryException, the exception message was set to null in HandleException, but this caused a std::logic_error on the C++ side when trying to convert nullptr to std::string when constructing an arrow::Status in ManagedRandomAccessFile::GetResult. The error looks like:
ParquetSharp.ParquetException: St11logic_error (message: 'basic_string::_S_construct null not valid')
I've added a check for exception == nullptr to fix this.
I've also changed the TRYCATCH macro so that these errors are propagated out as an OutOfMemoryException again, and fixed the use of plain integers for status codes.
When one of the
ManagedRandomAccessFile
methods called from C++ caused anOutOfMemoryException
, the exception message was set tonull
inHandleException
, but this caused astd::logic_error
on the C++ side when trying to convertnullptr
tostd::string
when constructing anarrow::Status
inManagedRandomAccessFile::GetResult
. The error looks like:I've added a check for
exception == nullptr
to fix this.I've also changed the
TRYCATCH
macro so that these errors are propagated out as anOutOfMemoryException
again, and fixed the use of plain integers for status codes.