dotnet / dotnet/csharpstandard
Spec explains exception handing twice, inconsistently
- Dominant language
- C#
- Stars
- 815
- Forks
- 99
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 16
Description
I was looking for a detailed explanation of exception handling in the spec and found the section [*Exceptions: How exceptions are handled*](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/exceptions#how-exceptions-are-handled). I found this description insufficient, because:
* It seems to imply `finally` without any corresponding `catch` in a thread is not guaranteed to execute (since it's implementation-defined).
* It does not mention exception filters.
Then I found the section [*Statements: The try statement*](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/statements#the-try-statement), which offers a much better explanation of the execution of the `try` statement.
Is there a reason why the same explanation is in two different places in the spec? Maybe the explanation in *Exceptions* should just be removed?
This issue also seems to be present in version 5.0 of ECMA-334, except that it doesn't mention exception filters at all, because those were introduced in C# 6.0.
Contributor guide
Assessment
This issue has not been assessed yet.