Skip to content

Flow documentation · legacy product

LogErrorAndContinue ​

Declaration ​

procedure LogErrorAndContinue(aMesg : string);

Example ​

pascal
procedure OnMapEvent(var Value:Variant);
begin
  if MyData.EOF then
LogErrorAndContinue('You are at the end of records in MyData recordset');
end;

Description ​

Creates an entry in the action Log of type User Error. The rest of the map will continue to execute unlike with LogError. At the end of the map the action will stop with a failed status.

This provides the opportunity to capture all the errors that are going to occur during the execution of the map and report them to the user in one go. Otherwise with LogError the user may fix the first error and then re-run the process only to get another error later in the map.

Be careful when using this function - it is possible that there is a later dependence on the first error and therefore a cascading error can occur. For instance if you are trying to retrieve a value and an error occurs, you might have another error later because the value is missing. LogError would have stopped after the first error but this function will continue and raise another error because of the missing value. This can confuse a user because in reality all they need to do is fix the first error and the second would not have happened. When using this function always make sure that there is not going to be cascading errors.

By using this function you are indicating to the user that an error has occurred that cant be recovered from automatically, and therefore the user needs to step in. The message that is logged should provide enough information for the user to fix the problem and re-run the action.