Returns true if an error has occurred on the associated stream. Specifically, returns true if badbit or failbit is set in rdstate().
badbit
failbit