cplusplus.com cplusplus.com
cplusplus.com   C++ : Reference : IOstream Library : ios_base : failure
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forum
Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
IOstream Library
manipulators
classes:
· filebuf
· fstream
· ifstream
· ios
· iostream
· ios_base
· istream
· istringstream
· ofstream
· ostream
· ostringstream
· streambuf
· stringbuf
· stringstream
objects:
· cerr
· cin
· clog
· cout
types:
· fpos
· streamoff
· streampos
· streamsize
ios_base
· ios_base::ios_base
· ios_base::~ios_base
member classes:
· ios_base::failure
· ios_base::Init
member functions:
· ios_base::flags
· ios_base::getloc
· ios_base::imbue
· ios_base::iword
· ios_base::precision
· ios_base::pword
· ios_base::register_call...
· ios_base::setf
· ios_base::sync_with_stdio
· ios_base::unsetf
· ios_base::width
· ios_base::xalloc
member types:
· ios_base::event
· ios_base::event_callback
· ios_base::fmtflags
· ios_base::iostate
· ios_base::openmode
· ios_base::seekdir

-

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.

© The C++ Resources Network, 2000-2007 - All rights reserved
Spotted an error? - contact us