I have long code which goes through iteration process. some times I get error messages. I want to get the iteration numbers (or any kind of output indications) when errors happen. for example, how can I print something when error happen in this simple example:
Do[{i/i, 1/(i - 5)}, {i, -10, 10}]
here, there are two errors when i=0 & when i=5,
how can I output the values of i when the errors happen.
I have different kinds of errors so I want to get the output if any kind of error happen.
thanks.