# std::logic_error Class Reference

One of two subclasses of exception. More...

Inheritance diagram for std::logic_error:

[legend]
Collaboration diagram for std::logic_error:

[legend]
List of all members.

## Public Methods

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

## 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 54 of file stdexcept.

## 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.

## 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.

The documentation for this class was generated from the following files:

- stdexcept
- stdexcept.cc