If I'm trying to read untill end of file, using fgets(), and somewhere inside the loop, let's say fgets fails. (Which means we got a read-error).
What would be the most correct thing to do if that occur?
Can I try using fgets() again and again, and hope it can work again?
Or can I try using fgets() again and again at an error, but perhaps with a max-counter?
Or do I have to stop all reading, and close the file?