I apologize if I'm missing something, but I still don't see how this helps me. I believe what I'm after is exception handling.. My Mech agent submits a query to the server and gets disconnected, and I get a fatal error at the command line (server: timeout). I just want to be able to restart at the failed iteration of my loop without having to manually execute the script again..? I can't continue or exit the loop; My program dies upon being disconnected.