Skip to content

Commit

Permalink
Merge branch 'master' into apple-silicon
Browse files Browse the repository at this point in the history
  • Loading branch information
adamreeve authored Oct 15, 2023
2 parents 904f6c6 + 7e22bef commit 90bdbe1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cpp/ExceptionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ struct ExceptionInfo final
expression \
return nullptr; \
} \
catch (const std::bad_alloc& exception) \
{ \
return new ExceptionInfo("OutOfMemoryException", exception.what()); \
} \
catch (const std::exception& exception) \
{ \
return new ExceptionInfo(exception); \
Expand Down
9 changes: 8 additions & 1 deletion csharp/ExceptionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ public static void Check(IntPtr exceptionInfo)

ExceptionInfo_Free(exceptionInfo);

throw new ParquetException(type, message);
if (type == "OutOfMemoryException")
{
throw new OutOfMemoryException(message);
}
else
{
throw new ParquetException(type, message);
}
}

public static TValue Return<TValue>(GetAction<TValue> getter)
Expand Down

0 comments on commit 90bdbe1

Please sign in to comment.