- Main Page
- Namespaces
- Classes
- Files
- Related Pages

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

# Mers::Utils::Exceptions::Exception Class Reference

`#include <Exception.h>`

Inheritance diagram for Mers::Utils::Exceptions::Exception:

[legend]
Collaboration diagram for Mers::Utils::Exceptions::Exception:

[legend]
List of all members.

## Public Member Functions
| Exception () throw ()
| Exception (Mers::Utils::Lang::String const &str) throw ()
| Exception (char const *str) throw ()
virtual | ~Exception () throw ()
virtual const char * | what () const throw ()
virtual Mers::Utils::Lang::String const & | toString () const throw ()
virtual void | print (std::ostream &out) const
## Protected Member Functions
virtual void | setMessage (Mers::Utils::Lang::String const &str)
virtual void | setMessage (char const *str)
## Protected Attributes
Mers::Utils::Lang::String | mMessage
| The message of the exception.

## Detailed Description

A class that describes a basic exception and the basic way to handle it.

Author:
  Paul H. Elliott

Definition at line 36 of file Exception.h.

## Constructor & Destructor Documentation

Exception::Exception | ( |  | ) | throw ()

Creates a new, empty exception.

Definition at line 27 of file Exception.cpp.

Exception::Exception | ( | Mers::Utils::Lang::String const & | str | ) | throw ()

Creates a new exception with the message str.

Parameters:

  | str | The message of this exception.

Definition at line 34 of file Exception.cpp.

Exception::Exception | ( | char const * | str | ) | throw ()

Creates a new exception with the message str.

Parameters:

  | str | The message of this exception.

Definition at line 41 of file Exception.cpp.

Exception::~Exception | ( |  | ) | throw ()`[virtual]`

Destroys this object.

Definition at line 48 of file Exception.cpp.

## Member Function Documentation

const char * Exception::what | ( |  | ) | const throw ()`[virtual]`

A C-style string describing the cause of the error.

Definition at line 55 of file Exception.cpp.

References Mers::Utils::Lang::String::c_str(), and mMessage.

Here is the call graph for this function:

String const & Exception::toString | ( |  | ) | const throw ()`[virtual]`

A C-style string describing the cause of the error.

Definition at line 62 of file Exception.cpp.

References mMessage.

Referenced by print().

void Exception::print | ( | std::ostream & | out | ) | const`[virtual]`

Prints the exception's contents to the output out.

Parameters:

  | out | The place where exception information should be printed.

Reimplemented in Mers::Executives::DeductiveController::Rtapi::NULLObjectException.

Definition at line 71 of file Exception.cpp.

References toString().

Here is the call graph for this function:

void Exception::setMessage | ( | Mers::Utils::Lang::String const & | str | ) | `[protected, virtual]`

Sets the message of this exception

Parameters:

  | str | The message of this exception.

Definition at line 80 of file Exception.cpp.

References mMessage.

Referenced by Mers::Utils::Exceptions::OutOfRangeException::OutOfRangeException().

void Exception::setMessage | ( | char const * | str | ) | `[protected, virtual]`

Sets the message of this exception

Parameters:

  | str | The message of this exception.

Definition at line 87 of file Exception.cpp.

References mMessage.

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

- /Users/fpy/titan-1-5-MBARI/Mers/Utils/Exceptions/Exception.h
- /Users/fpy/titan-1-5-MBARI/Mers/Utils/Exceptions/Exception.cpp