Skip to content

Fix for #1568 when RaiseAsync with a void Delegate returns null results in System.NullReferenceException#1571

Open
Keugon wants to merge 2 commits intodevlooped:mainfrom
Keugon:main
Open

Fix for #1568 when RaiseAsync with a void Delegate returns null results in System.NullReferenceException#1571
Keugon wants to merge 2 commits intodevlooped:mainfrom
Keugon:main

Conversation

@Keugon
Copy link
Copy Markdown

@Keugon Keugon commented Jul 3, 2025

Hi this is my best guess on improving information on issue when try to use the RaiseAsync() with a void Delegate with a more informativ Exception.

this is my first ever pullrequest and iam pretty sure i done many mistakes
#1568

Help Wanted here

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jul 3, 2025

CLA assistant check
All committers have signed the CLA.

@Keugon
Copy link
Copy Markdown
Author

Keugon commented Jul 28, 2025

is there more that i need to do so this can be considered?

@kzu
Copy link
Copy Markdown
Member

kzu commented Apr 8, 2026

void-returning async methods are a huge red flag in .NET. They lead to unobserved exceptions that can tear down a process. not sure we want to encourage that sort of design... 🤔

@kzu
Copy link
Copy Markdown
Member

kzu commented Apr 8, 2026

I'll still merge it because it's not introducing a breaking change from something that previously worked (nobody would set up this previously), so it's new behavior. Although there is a slight chance that someone was relying on the previous (unrelated) exception to catch this scenario (think: a pseudo-verification by side-effect), that would have been quite unlikely, I'd say.

@kzu kzu enabled auto-merge (rebase) April 8, 2026 04:04
@Keugon
Copy link
Copy Markdown
Author

Keugon commented Apr 9, 2026

@kzu do i need to do anything here, iam still not very familiar with github and opensource repos, i just work with a local gitlab on company repos.

If i need to take action here please tell me

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

Successfully merging this pull request may close these issues.

3 participants