Hi ,
I Need to handle exception in parallel.foreach because i Need to check for each task i got problem. I tried:
parallel.&Foreach(0,1)
.TaskConfig(parallel.TaskConfig.OnTerminated(
procedure(const task: IOmniTaskControl)
var
excp: Exception;
begin
if assigned(task.FatalException) then begin
excp := task.DetachException;
outvatinfo.Lines.Add('Caught async exception '+excp.ClassName+':'+excp.Message);
FreeAndNil(excp);
end;
end))
.Execute(
procedure(const value: integer)
begin
raise Exception.Create('Exception in Async');
//strtofloat('&');
// outvatinfo.Lines.Add(datetimetostr(now())) ;
end);
But It crash....
Someone can help me?
Thanks Alessandro