exceptions4c  version 2.8
An exception handling framework for C
e4c_exception_type Struct Reference

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

Data Fields

const char * name
 The name of this exception type.
const char default_message [E4C_EXCEPTION_MESSAGE_SIZE]
 The default message of this exception type.
const e4c_exception_typesupertype
 The supertype of this exception type.

Detailed Description

Represents an exception type in the exception handling system.

The types of the exceptions a program will use are defined in source code files through the macro E4C_DEFINE_EXCEPTION. In addition, they are declared in header files through the macro E4C_DECLARE_EXCEPTION.

When defining types of exceptions, they are given a name, a default message and a supertype to organize them into a pseudo-hierarchy:

 E4C_DEFINE_EXCEPTION(SimpleException, "Simple exception", RuntimeException);

Exceptions are usually defined as global objects. There is a set of predefined exceptions built into the framework, and RuntimeException is the root of the exceptions pseudo-hierarchy:

See also:
e4c_exception
E4C_DEFINE_EXCEPTION
E4C_DECLARE_EXCEPTION
throw
catch

Field Documentation

const char e4c_exception_type::default_message[E4C_EXCEPTION_MESSAGE_SIZE]

The default message of this exception type.

The name of this exception type.

The supertype of this exception type.


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