ios_base::failure | public member class |
class failure; |
Base class for stream exceptions
This embedded class is derived from the standard exception class and serves as a base class for objects thrown as exceptions by member functions in the iostream hierarchy of classes.
It is defined (within the std namespace) as:
class ios_base::failure : public exception { public: explicit failure (const string& msg); virtual ~failure(); virtual const char* what() const throw(); } |
Members
- explicit failure (const string& msg); (constructor)
- The value of string received as the msg parameter is internally stored and its C-string equivalent is returned by subsequent calls to what.
It effectively calls its parent class' constructor (exception::exception). - virtual ~failure(); (destructor)
- No operation.
- virtual const char* what() const;
- Returns the C-string value equivalent to the msg argument used on its construction.