Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual C++
Reference
Libraries Reference
<exception>
Classes
 exception Class
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Standard C++ Library Reference 
exception Class 

The class serves as the base class for all exceptions thrown by certain expressions and by the Standard C++ Library.

class exception {
public:
   exception( ); 
   exception(const char *const&);
   exception(const char *const&, int);
   exception(const exception&); 
   exception& operator=(const exception&); 
   virtual ~exception( );
   virtual const char *what( ) const;
};

Specifically, this base class is the root of the standard exception classes defined in <stdexcept>. The C string value returned by what is left unspecified by the default constructor, but may be defined by the constructors for certain derived classes as an implementation-defined C string. None of the member functions throw any exceptions.

The int parameter allows you to specify that no memory should be allocated. The value of the int is ignored.

For examples of the use of the standard exception classes that inherit from the exception class, see any of the classes defined in <stdexcept>.

Header: <exception>

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker