DeepSource has joined Harness. Learn more
C# logoC#/
CS-R1082

Reserved `Exception` being thrownCS-R1082

Major severityMajor
Anti-pattern categoryAnti-pattern

Certain Exceptions are meant to be raised only by the Common Language Runtime (CLR) and should not be raised from within your code. It is recommended that you use more appropriate and suitable Exceptions instead.

Bad Practice

throw new IndexOutOfRangeException();
throw new ArgumentOutOfRangeException();

Reference