You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a shorter notation for commands with fail-cases
Prevents developers from writing the following
namespaceSystem.Collections.Generic;voidExample(){try{Method1();}catch(Exceptionex1){try{Method2();}catch(Exceptionex2){try{Method3();}catch(Exceptionex3){Console.WriteLine("Couldn't do it");}}}}
API Proposal
namespaceSystem.Collections.Generic;voidExample(){try{Method1();}fallback(Exceptionex1){Method2();}fallback(Exceptionex2){Method3();}catch(Exceptionex3){Console.WriteLine("Couldn't do it");}}
API Usage
namespaceSystem.Collections.Generic;voidExample(){try{Method1();}fallback(Exceptionex1){Method2();}fallback(Exceptionex2){Method3();}catch(Exceptionex3){Console.WriteLine("Couldn't do it");}}
Alternative Designs
No response
Risks
Variables from a former scope are not available in subsequent fallback blocks
The text was updated successfully, but these errors were encountered:
Background and motivation
Provide a shorter notation for commands with fail-cases
Prevents developers from writing the following
API Proposal
API Usage
Alternative Designs
No response
Risks
Variables from a former scope are not available in subsequent
fallback
blocksThe text was updated successfully, but these errors were encountered: