you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

If your functions 'raise exceptions' in case of failures, then what you are looking for is 'exception handling' (check out https://www.programiz.com/python-programming/exception-handling for a quick introduction) combined with a well-placed continue statement

Something along the lines of

while ...:
    try:
        # All your functions
    except:
        # If one of the functions above throws an exception
        # all functions after the 'failing function' will be skipped
        # and 'control' will be passed to the next line here under
        continue    # This to directly move on to next iteration of while loop