TheBugSlayer
Programmer
Hello all. Please help me understand the try except statement.
My program is structured like this:
What I am trying to achieve is to take the corresponding action when an exception occurs but still be able to move on to the next record in the recordset and process it. However, I leave the program running overnight and when I come in the morning it stops at the first exception. I would have hoped it records the error but continues processing. How do I achieve that?
Noe: The statements in the outer TRY EXCEPT block my generate exceptions too...
Your helping is appreciated.
My program is structured like this:
Code:
while not RS.EOF do begin
try
try
ItemList.LoadFromFile(SomeFile);
except
RS.MoveNext;
continue;
end;
...
...
...
...
except
...
LogError(Msg);
RS.MoveNext;
continue;
end;
end;
What I am trying to achieve is to take the corresponding action when an exception occurs but still be able to move on to the next record in the recordset and process it. However, I leave the program running overnight and when I come in the morning it stops at the first exception. I would have hoped it records the error but continues processing. How do I achieve that?
Noe: The statements in the outer TRY EXCEPT block my generate exceptions too...
Your helping is appreciated.