failure class: It is a lass in the <ios_base> header to handle exceptions or a failure.
explicit failure(const string &str);
here str is used to tell the type of error or exception. To get str what() function is used which has the syntax:
virtual const char *what( ) const throw( );