Inspectopedia
 
2024.3

'throw' caught by containing 'try' statement

Warning
New
Last modified: 03 December 2024

Reports throw statements whose exceptions are always caught by containing try statements.

Using throw statements as a "goto" to change the local flow of control is confusing and results in poor performance.

Example:

Use the Ignore rethrown exceptions option to ignore exceptions that are rethrown.