Inspectopedia
 
2024.3

Assignment to 'catch' block parameter

Warning
New
Last modified: 03 December 2024

Reports assignments to, catch block parameters.

Changing a catch block parameter is very confusing and should be discouraged.

The quick-fix adds a declaration of a new variable.

Example:

After the quick-fix is applied: