C++ Rule 1199 false positive for MFC TRY/CATCH macros

Noticed using latest version of SonarLint for Visual Studio (4.13.0.11687)

Rule 1199 which detects nested code blocks is falsely triggered by the usage of MFC TRY/CATCH macros. Simplified example:

TRY {
	CFile::Remove(path);
} CATCH_ALL (ex) {
	return false;
} END_CATCH_ALL

Hello @awjan,

Thanks for reporting this false-positive.
I created this ticket where you can follow the issue. It should be fixed in the next release planned at the end of this month.

Thanks,
Abbas

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.