I am processing data from a stringgrid into a table and have the code block below which should give a silent error and add the detail to my log file, but instead the program stops if it encounters a duplicate record and throws a standard error message, then will not process any more data.
The problem is inconsistent, because I use try ... except blocks in other parts of the code, and they work as expected - throwing a silent error and adding detail to the log.
I am not running inside the IDE. Am I missing something ....?
procedure TForm1.AddToCCOExtras(Cde: String; ACol: Integer);
If FindExtrasCode(Cde) then
With Table1 do
If Not Missing then
AddToErrorLog(' Duplicate person:');
end else AddToErrorLog(' Code '+Cde+' missing from JobOrder ');