LC0071 - StefanMaron/BusinessCentral.LinterCop GitHub Wiki

Incorrect IsHandled parameter assignment.

The IsHandled parameter should never be set to false, either directly or as a result of a condition or method call. Doing so can cause issues if an earlier subscriber has already set it to true.

Examples

// This is fine
IsHandled := true;

// This is (obviously) bad
IsHandled := false; 

// This is also fine
IsHandled := IsHandled or Item.Blocked;

// This is again fine
if MyCondition then
  IsHandled := true; 

// This is very dangerous
if not MyCondition then
  IsHandled := false;

// This is also very dangerous
IsHandled := MyCondition;

Read more