Assertion is suppressed by 'catch'

Last modified: 03 December 2024

Reports assert statements and test framework assertions that are suppressed by a surrounding catch block. Such assertions will never fail, as the thrown AssertionError will be caught and silently ignored.

Example 1:

Example 2:

Example 3:

New in 2020.3