Perhaps you can save the input variables used for your runfunction into a separate cell array. Try this for example:
ErrorFile = cell(1, 1000);
parfor k = 1:1000
stuff1 = rand(1);
stuff2 = rand(1);
try
assert(stuff1 > stuff2, 'OOPS: Error in this function!'); %Pretend this is the "runfunction". If there's an error, record the input variables.
catch Msg
ErrorFile{k} = {Msg, k, stuff1, stuff2}; %Save the iteration #, variables, and error message
end
end
ErrorFile(cellfun(@isempty, ErrorFile)) = []; %This stores variables required to redo parfor with errors
cellfun(@(x) display(x{1}), ErrorFile); %Display all the error messages