TypeName | RethrowExceptionAnalyzer |
Check Id | CC0012 |
Category | Naming |
Severity | Warning |
Throwing the same exception as passed to the ‘catch’ block lose the original stack trace and will make debugging this exception a lot more difficult.
The correct way to rethrow an exception without changing it is by using ‘throw’ without any parameter.
You will have two choices: you can rethrow the original exception as is:
Or you can rethrow the original exception as an inner exception, like so:
None
TBD