Mark portions of code to be ignored by dotCover

I have some portions of my code that I never intend on covering in my automated tests. An example is a catch block to a failing database transaction where I rollback the transaction. Is there a way that I can mark the code so that it does not count against the percentage coverage of the code that I run in my tests?

1 comment

Hello Bernard,
Currently there's no way to filter out statements in the catch block from the coverage statistics statistics.
Here is a corresponding request in our issue tracker:
Also we're going to introduce filtering by attributes:


Please sign in to leave a comment.