Question: timelimit for each loop

I am trying to set a timelimit for each loop, i.e.

for i from 1 to 10 do
        timelimit(10,print(someproc())); #print result from the procedure being called
    catch "time expired":
        print(i, "time expire");
    end try;
end do;

However, it doesn't move to the next loop. It just terminates after completely the first loop (i.e. i=1).

Please help.

Thank you in advance.

Please Wait...