Once an input stream has failed, it is very hard to "unfail" it. You can clear the failbit and take your chances, but that is pretty useless in practice. If you cannot tolerate failure, read the input file as a sequence of strings and then parse the strings.
Source: wiktionary
[…] the problem with HUD running the Housing Authority has to be addressed, because you can't expect the agency that has failed, to unfail.
Source: wiktionary
So-called failed states were perceived as breeding grounds for transnational violence, so great powers began to compete for the right to "unfail" them, to make or re-make their regimes to eliminate security contagion.
Source: wiktionary
Trying to Unfail the Homeless Individual – Wibke Schniedermann.
Source: wiktionary