Whole document tree
    

Whole document tree

std::logic_error class Reference
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

std::logic_error Class Reference

One of two subclasses of exception. More...

#include <std_stdexcept.h>

Inheritance diagram for std::logic_error:

Inheritance graph
[legend]
Collaboration diagram for std::logic_error:

Collaboration graph
[legend]
List of all members.

Public Methods

 logic_error (const string &__arg)
virtual ~logic_error () throw ()
virtual const char * what () const throw ()

Private Attributes

string _M_msg

Detailed Description

One of two subclasses of exception.

Logic errors represent problems in the internal logic of a program; in theory, these are preventable, and even detectable before the program runs (e.g., violations of class invariants).

Definition at line 56 of file std_stdexcept.h.


Constructor & Destructor Documentation

std::logic_error::logic_error const string   __arg [explicit]
 

Takes a character string describing the error.

Definition at line 39 of file stdexcept.cc.

References std::string.

std::logic_error::~logic_error   throw () [virtual]
 

Definition at line 42 of file stdexcept.cc.


Member Function Documentation

const char * std::logic_error::what   const throw () [virtual]
 

Returns a C-style character string describing the general cause of the current error (the same string passed to the ctor).

Reimplemented from std::exception.

Definition at line 45 of file stdexcept.cc.


Member Data Documentation

string std::logic_error::_M_msg [private]
 

Definition at line 58 of file std_stdexcept.h.


The documentation for this class was generated from the following files:
Generated on Mon Apr 8 03:19:00 2002 for libstdc++-v3 Source by doxygen1.2.15