In situations like this in the past, I have been tempted to devise an operation that is NOT a fatal error, but that detects the error condition. Something that runs async and can be tested for success. if it fails, I delay a few seconds and try again. But this is terribly fiddly and often does not work anyway.
These days, I always put my effort into resolving the basic failure issue.
One trick I use when running an exe off an unreliable network drives is to copy the exe to local C drive, and run it from there.
; This section tries to run the program from the C drive
; instead of the network drive.
if rtstatus()==1
t = intcontrol(1004,0,0,0,0)
if strsub(filepath(t),1,1) != "C" ; not running from C drive?
if !direxist("C:\TEMP") then dirmake("C:\TEMP")
s = strcat("C:\TEMP\",filebasename(t))
switch fileexist(s)
case 0 ; not exist
terminate(!FileCopy(t,s,0),mytitle,"cant copy program to c:\temp")
break
case 2 ; exists but locked from read
terminate(1,mytitle,"can not copy program to c:\temp")
break
case 1 ; exists
if FileTimeGet(s) != FileTimeGet(t) ; not match timestamp?
errormode(@off) ; tolerate failure
FileCopy(t,s,0) ; try to copy over it
errormode(@on)
endif
endswitch
;display(1,"transferring...","")
run(s, intcontrol(1006,0,0,0,0)) ; run the C drive copy
exit ; and exit from this copy
endif
endif