Skip to content

Add ability to raise AppDomain.UnhandledException event.#114392

Merged
AaronRobinsonMSFT merged 11 commits into
dotnet:mainfrom
AaronRobinsonMSFT:raise_unhandled_exception
Apr 10, 2025
Merged

Add ability to raise AppDomain.UnhandledException event.#114392
AaronRobinsonMSFT merged 11 commits into
dotnet:mainfrom
AaronRobinsonMSFT:raise_unhandled_exception

Conversation

@AaronRobinsonMSFT

Copy link
Copy Markdown
Member

This API is primarily for use in interop scenarios where the .NET runtime is hosted and an unhandled exception is detected by the hosting runtime. See #102730 for additional details.

Fixes #102730

@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 10.0.0 milestone Apr 8, 2025
Copilot AI review requested due to automatic review settings April 8, 2025 17:53
@ghost

ghost commented Apr 8, 2025

Copy link
Copy Markdown

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

1 similar comment
@ghost

ghost commented Apr 8, 2025

Copy link
Copy Markdown

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • src/tests/baseservices/exceptions/RaiseUnhandledExceptionEvent/RaiseEvent.csproj: Language not supported
Comments suppressed due to low confidence (1)

src/coreclr/vm/metasig.h:361

  • [nitpick] The new meta-signature for returning bool is introduced without additional context. Consider adding a clarifying comment explaining its intended usage and how it differs from similar meta-signatures to improve overall code clarity.
DEFINE_METASIG(SM(Obj_RetBool, j, F))

@AaronRobinsonMSFT

Copy link
Copy Markdown
Member Author

/cc @jonpryor @rolfbjarne @jkotas @VSadov

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

Comment thread src/libraries/System.Private.CoreLib/src/System/AppContext.cs
Comment thread src/libraries/System.Private.CoreLib/src/System/AppContext.cs
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Comment thread src/coreclr/vm/appdomain.cpp Outdated
Comment thread src/coreclr/vm/appdomain.cpp Outdated
Comment thread src/coreclr/vm/comdelegate.cpp
Comment thread src/tests/baseservices/exceptions/RaiseUnhandledExceptionEvent/RaiseEvent.cs Outdated
Comment thread src/libraries/System.Private.CoreLib/src/System/AppContext.cs Outdated

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@AaronRobinsonMSFT

Copy link
Copy Markdown
Member Author

/ba-g Unable to get logs for the failing tests, but they don't seem related given the details I see on AzDO.

@AaronRobinsonMSFT AaronRobinsonMSFT merged commit 8f4f9cf into dotnet:main Apr 10, 2025
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the raise_unhandled_exception branch April 10, 2025 04:18
@github-actions github-actions Bot locked and limited conversation to collaborators May 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Raise the AppDomain.UnhandledException event for exceptions outside the runtime.

5 participants