Exception Struct Reference

Represents an exception in the exception handling system. More...

Data Fields

const char * name
 The name of this exception.
const char * description
 The description of this exception.
const Exceptionsuper
 The supertype of this exception.

Detailed Description

Represents an exception in the exception handling system.

Exceptions are objects with a name, a description and a super-type.

They are defined through the macro DEFINE_EXCEPTION:

 DEFINE_EXCEPTION(StackException, "Stack overflow", RuntimeException);
 DEFINE_EXCEPTION(StackOverflowException, "Stack overflow", StackException);
 DEFINE_EXCEPTION(StackUnderflowException, "Stack underflow", StackException);
 

Exceptions are usually defined as global const objects. There is a set of predefined exceptions built into the framework, amongst others:

RuntimeException is the root of the exceptions pseudo-hierarchy. Any exception can be caught by a catch(RuntimeException) block.


Field Documentation

The description of this exception.

const char* Exception::name

The name of this exception.

The supertype of this exception.


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

exceptions4c version 1.3
Copyright 2010 Guillermo Calvo.

Generated on 24 Jan 2010 by doxygen 1.6.2