basic_ios::exceptions

basic_ios::exceptions

iostate exceptions() const;
iostate exceptions(iostate except);

The first member function returns the stored exception mask. The second member function stores except in the exception mask and returns its previous stored value. Note that storing a new exception mask can throw an exception just like the call clear( rdstate()).