ios_base::failure exception class | ios_base |
cplusplus.com |
Base class for exceptions.
This embedded class derives from standard exception class and serves as
base class for objects thrown as exceptions by functions in the iostream hierarchy.
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; }
Members.
- explicit failure (const string& msg);
- Constructs a failure object. Its msg parameter will be returned when member what is called. Effectively calls exception(msg).
- virtual ~failure();
- No operation.
- virtual const char* what() const;
- Returns the msg which the object was created with.
See also.
ios_base class