Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1. //a try/except loop
  2. do
  3. {
  4.     try
  5.     {
  6.         //put all the stuff associated with your error causing code in here
  7.        
  8.         break; //this will end the loop once the code runs right
  9.     }
  10.     except
  11.     {
  12.         //put the stuff that you want to happen when the above code fails, in here!
  13.     }
  14.  
  15. }while(true) //this syntax may not be right!
  16.  
  17.  
  18. //this will keep repeating the error causing code until it doesnt cause an error.
  19. //at that point it will break from the loop and move on with the sequence.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement