-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add exception support to Reinterop #548
Conversation
And handle the possibility that the NativeImplementation property is called on an invalid object (it will now return nullptr).
This still has a problem where constructors have an exception parameter in C# but not C++, so don't merge it yet. |
Ok this should be ready to go now! |
The PR looks good, but seems like there's still a build error on Windows. |
The build error is that openssl is failing to build on ARM64 Android. I have no idea what we could've changed to make that happen. Re-running the build to see if it's just a fluke. |
Yeah that intermittent Android build error has been happening for awhile. As far as I can tell, it's some sort of race condition in OpenSSL's custom build process. Running the build again usually fixes it. |
Exceptions thrown in C# can be caught in C++, and exceptions thrown in C++ can be caught in C#. Exceptions thrown in C# can also now safely pass through C++ code to be code in other C# code, and vice-versa.
This is a big improvement because previously:
Fixes #18
It works pretty much just as I described in this comment:
#18 (comment)