Skip to content
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

Rework native->managed callbacks to allow for managed errors #2626

Open
nirinchev opened this issue Sep 14, 2021 · 0 comments
Open

Rework native->managed callbacks to allow for managed errors #2626

nirinchev opened this issue Sep 14, 2021 · 0 comments

Comments

@nirinchev
Copy link
Member

Description

As seen in #1978, if we throw an exception in a managed function called by native, that will result in a pretty hard crash. We should revisit where we invoke managed callbacks from native and figure out whether errors need to be returned and rethrown "somewhere"

Example code that will cause an issue:

realm.Changed += (s, e) =>
{
	throw new Exception("aaa");
};

We should probably design a system where managed callbacks either swallow/log all exceptions or return a pointer to the exception in native, which is then rethrown back in managed at some point.

How important is this improvement for you?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant