The Gnome Chemistry Utils: gcu::parse_error Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Directories

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# gcu::parse_error Class Reference

`#include <gcu/formula.h>`

List of all members.

## Public Member Functions
| parse_error (const string &__arg, int start, int length)
virtual const char * | what () const throw ()
const char * | what (int &start, int &length) const throw ()
void | add_offset (int offset)

## Detailed Description

Exception class derived from std::exception used for errors encountered when parsing a formula.

Definition at line 43 of file formula.h.

## Constructor & Destructor Documentation

gcu::parse_error::parse_error | ( | const string & | __arg,
|  | int | start,
|  | int | length |
| ) |  |  | `[explicit]`

Takes a character string describing the error and two integers indicating where the error occured.

## Member Function Documentation

virtual const char* gcu::parse_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 constructor).

const char* gcu::parse_error::what | ( | int & | start,
|  | int & | length |
| ) |  |  | const throw ()

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

void gcu::parse_error::add_offset | ( | int | offset | ) | `[inline]`

Adds an offset to the start of the error. This is used by the Formula class when an exception occurs while parsing a substring.

Definition at line 69 of file formula.h.

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

- formula.h