Skip to content

Instantly share code, notes, and snippets.

@lolbro-pl
Created March 10, 2017 21:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save lolbro-pl/9f6e0ab7b8e66f7b7a6c559076ae799b to your computer and use it in GitHub Desktop.
int retryAttempts = 1;
do
{                   
   try
   {
       // do something
    }
    catch (DivideByZeroException dbze)
    {
        if (retryAttempts > 0)
        {
         //retry + loggging             
        }
    }
}
while (retryAttempts-- > 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment