dotnet / dotnet/vblang

Champion "Await in Catch and Finally"

Open
#37 18 comments 5 reactions 0 assignees View on GitHub
Approved-in-Principle Proposal Scenario-Needed
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

VB doesn't allow this today and C# does. Seems like it could be a pain if APIs require this pattern a lot.

There are special design considerations required for VB as in VB it is permitted to `Goto` from the Catch block back into the `Try` block. This would complicate the state machine rewrite a bit:

dim retryCount = 0
try
retry:
catch ex as Exception When retryCount < 3
retryCount += 1
goto retry
end try

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.