Exception filters appear on the wrong line
See original GitHub issueSteps:
dotnet tool install --global dotnet-reportgenerator-globaltool
git clone https://github.com/hughbe/wpf
cd wpf
git checkout coverlet
dotnet test ./src/Microsoft.DotNet.Wpf/test/System.Xaml /P:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=./coverage.xml /P:ExcludeByAttribute=ExcludeFromCodeCoverageAttribute
reportgenerator -reports:./coverage.xml -targetdir:./coverage
Expected
- Exception filters coverage is on the right line
Actual
- Exception filters are on the wrong line
See for example L1349 of the coverage for XamlSchemaContext.cs
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
c# - Why exception filters are preferable to catching and ...
Exception filters are preferable to catching and rethrowing because they leave the stack unharmed. If the exception later causes the stack to ...
Read more >The throw keyword shows the wrong thrown exception line
The filters give you even better diagnostic experience because of the crash dump will have the stacktrace of the original throw site preserved....
Read more >Exception filters in C# 6: their biggest advantage is not what ...
In the code with exception filters, on the other hand, the filter won't match, so the catch block won't be entered at all,...
Read more >The good and the bad of exception filters - .NET Blog
The key is to only read information from either the exception object itself, or from immutable global state, and to not change any...
Read more >Exception filters | NestJS - A progressive Node.js framework
Exception filters. Nest comes with a built-in exceptions layer which is responsible for processing all unhandled exceptions across an application.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi guys, I’m working on other issues at the moment, if no one solve this meanwhile I’ll take a look.
@MarcoRossignoli You mean like this? (It’s the same code of my previous image, now fixed)
What I ment for tests was this (this is how i have it in my fork):
So using
Single
istead ofFirst
for_module.Types
and_type.Methods
Cheers!