Posted by flamer die.spam@hotmail.com on 12/17/05 11:52
ImOk wrote:
> I just have a question about trapping and retrying errors especially
> file locking or database locks or duplicate key errors.
>
> Is there a way after you trap an error to retry the same line that
> cause the error?
>
> In many other languages you have the option of rertying certain errors.
> In effect, its like a return to the exact same line. You can then retry
> certain # of times and then produce an error if it keeps failing.
All I can think of is to use a loop
while $result == null
if ($retries > '3') { //do stuff $retries++ }
or you can kill the script on error then reload the page
header:$php_self?retries=$retries
meh.. there is a way.. somehow.
Flamer.
Navigation:
[Reply to this message]
|