dotnet / dotnet/macios

Add a Runtime.UncaughtObjectiveCException event

Open
#6,021 0 comments 0 reactions 0 assignees View on GitHub
enhancement iOS macOS
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 12h
Merged PRs (30d)
123

Description

Currently we try to handle uncaught NSExceptions, convert to a managed exception and throwing that managed exception.

This is done by calling NSSetUncaughtExceptionHandler to do this: https://github.com/xamarin/xamarin-macios/blob/3c66051e5ad0d2efa842ea5917b9d62e9c345e8b/runtime/runtime.m#L1183-L1195

The suggestion would be to add a managed Runtime.UncaughtObjectiveCException event that is called before throwing the converted managed exception, so that app developers can easily log these exceptions.

See also: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/867387

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.