Of course, there's a difference, in the most obvious way int the first case you will only check for errors before entering the loop, if the loop doesn't have exception throwers, leave it that way. In the other hand you will be checking it in each iteration, wich you'll need if you have sentences or methods ... wich can have exceptions.
I'dont know if i explain myself well, let me know if you understand