Oh well, it is Friday, I have a terrible headache for the second day in a row and I am having problems trying to solve a simple update conflict, so my brain is turned off apparently, this is the best it was able to come up with
on error handleError()
someCode()
lcFile = myGetFileRoutine()
use (lcFile)
moreCode()
on error
function handleError
if error = error opening file
lcFile = myMyGetAlternateFileRoutine()
retry
else
handleTheError()
endif
Which is similar to your last algorithm, but they looked different to me for in the first one you were trying to re-run someCode() and in the last you did not, or so it seemed to me
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges