Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

# Keos::CException Class Reference

Base class for the exceptions. More...

`#include <KeosException.h>`

Inheritance diagram for Keos::CException:

List of all members.

## Public Member Functions

| CException (const String &strMessage="")
| Constructor.
virtual | ~CException ()
| Destructor.
virtual const char * | what () const
| Return the message of the exception.
const char * | what_short () const
| Return a short description of the exception.
void | SetFileLine (String strFile, int nLine)
| Set The file and line wher the exception occured.

## Static Public Member Functions

static CException * | GetLastException (void) throw ()
| Retrieves a pointer to the last exception created.

## Protected Attributes

String | m_strMessage
| Message associated to the exception.
String | m_strShortMessage
| Short message for the log.

## Static Protected Attributes

static CException * | ms_pLast = NULL
| The last exception created.

## Detailed Description

Base class for the exceptions.

Definition at line 42 of file KeosException.h.

## Constructor & Destructor Documentation

Keos::CException::CException | ( | const String & | strMessage = `""` | ) |

| Constructor.

Parameters:

  | strMessage | Message of the exception .

Definition at line 34 of file KeosException.cpp.

References m_strShortMessage, and ms_pLast.

Keos::CException::~CException | ( |  | ) | `[virtual]`

| Destructor. Definition at line 42 of file KeosException.cpp.

## Member Function Documentation

CException * Keos::CException::GetLastException | ( | void |  | ) | throw ()`[static]`

| Retrieves a pointer to the last exception created. Definition at line 59 of file KeosException.cpp. References ms_pLast.

void Keos::CException::SetFileLine | ( | String | strFile,
|  | int | nLine
| ) |

| Set The file and line wher the exception occured. Definition at line 65 of file KeosException.cpp. References m_strMessage, and m_strShortMessage.

const char * Keos::CException::what | ( |  | ) | const`[virtual]`

| Return the message of the exception.

Returns:
  Message of the exception.

Definition at line 47 of file KeosException.cpp.

References m_strMessage.

Referenced by Keos::handleTerminate().

const char * Keos::CException::what_short | ( |  | ) | const

| Return a short description of the exception.

Returns:
  Short description of the exception.

Definition at line 53 of file KeosException.cpp.

References m_strShortMessage.

## Member Data Documentation

String Keos::CException::m_strMessage`[protected]`

| Message associated to the exception. Definition at line 77 of file KeosException.h. Referenced by SetFileLine(), and what().

String Keos::CException::m_strShortMessage`[protected]`

| Short message for the log. Definition at line 79 of file KeosException.h. Referenced by CException(), SetFileLine(), and what_short().

CException * Keos::CException::ms_pLast = NULL`[static, protected]`

| The last exception created. Definition at line 31 of file KeosException.cpp. Referenced by CException(), and GetLastException().

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

- KeosEngine/KeosException.h
- KeosEngine/KeosException.cpp