It looks like number one is more effiecient however, code 2 is more stable since throw std can take up more memory when it throws an runtime exception i mean i cant really explain it lol personally im using a version of your code 2 if you look at my thread you'll see what I mean.
I think I should use the first version as mostly I am interested in reading the whole file. I expected more replies though.
Anyways , thanks @Hitesh and @cire