S6667 should not be raised for OperationCancelledException

The is already a github issue asking to exclude some exceptions from S6667.
I’m starting this thread here because the github issue did not get any update since March…

I also would like to see S6667 not raising for OperationCanceledException and TaskCancelledException.

There may be other exceptions, e.g. custom exceptions, which are “expected behavior”, so that they are not needed to be passed to the logging system. This is why configuration as proposed there maybe helpful. But, for user acceptance of this rule, OCE and TCE should be excluded by default.

Addtional candidated which can be discussed:

  • ChannelClosedException
  • ThreadInterruptedException

Hi @lg2de, and thanks for the report.

Indeed we should exclude OperationCancelledException as logging it is noise.

We’ll most probably add a list of exceptions in the rule to not raise rather than parametrize it for now.

I’ve added a ticket to our backlog for this (internal only)
and I added in the same ticket a mention to the other two exceptions you mentioned to investigate if they should included or not.

Thanks!