marinasundstrom / CheckedExceptionsAnalyzer

0 stars 0 forks source link

Handling throwing in asynchronous methods #18

Open marinasundstrom opened 1 day ago

marinasundstrom commented 1 day ago

Handle await statement (AwaitStatementSyntax)

Target should be handled the same.

Support Task, ValueTask, and Task-like?

Handle Task exceptions:

marinasundstrom commented 2 hours ago

I was thinking that I would not report of exceptions if the target is not awaited, but that is a bad idea.

Because the target (methods, properties, or delegates) might be throwing before the task is returned. And the result wouldn't be consistent with XML docs.

marinasundstrom commented 2 hours ago

It should be up to he developer to explicitly mark a methods as throwing exceptions, even TaskCanceledException.