By mswatcher
via srtsolutions.com
Published: Mar 06 2013 / 09:28
At my CodeMash precompiler, I mentioned how the C# compiler ensures that methods marked with the ‘async’ keyword that contain ‘await’ expressions never throw synchronous exceptions. Instead, those methods will return a Task (or Task) that will be placed in the faulted state if the method throws an exception. The compiler does the work to add the appropriate try/catch clauses to your methods, and translates any exceptions thrown during your method’s execution into returned faulted task.
Tweet
SaveShareSend
Tags: .net, frameworks, other languages
Add your comment