dotnet / dotnet/dotnet-api-docs
Update System.Exception.StackTrace remark to reflect the new behavior for rethrown exceptions
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
The line below needs to be updated to reflect the fix for dotnet/coreclr#15780 and implemented by dotnet/coreclr#16464. This change is expected to be included in .NET Core 2.1 - https://github.com/dotnet/coreclr/issues/15780#issuecomment-368585175.
This is the new behavior for rethrown exceptions:
1. **Exception rethrown in a method different than the method where it was originally thrown:** the stack trace contains both the location in the method where the exception was originally thrown, and the location where the method that threw the exception was called.
2. **Exception is thrown and later rethrown in the same method:** the stack trace only contains the location where the exception was originally thrown and does not include the location where the exception was rethrown.
https://github.com/dotnet/docs/blob/f66fe50bf0c637bfd9ca305c7ca30c3f37e50620/xml/System/Exception.xml#L1061
Contributor guide
Assessment
This issue has not been assessed yet.