You are here: Re: Retrying handled errors « PHP Programming Language « IT news, forums, messages
Re: Retrying handled errors

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация