I have the following code:
and I want to add try and catch to it, since each function takes look time to compute. and sometimes I get error which I want to deal with later on.
so how can I save the string error which I see on the screen without the try-catch, info on where the error happened?
for example, say that when i=5 it in line 111 of some_function2 I get an error.
I want to save some "failures" struct like the following:
failures(end).str='some_function2 in line 111"';
how can I save the 'some_function2 in line 111"' str which I see on the command window?