Next: , Previous: , Up: Top   [Contents][Index]


1 Overview of the package

This document describes version 0.9.0-devel.3 of CCExceptions, a C11 language library; it implements an interface to non–local exits, which is somewhat similar to exceptions handling. The library targets POSIX systems.

This tiny library will not solve the problem of error handling in the C language, it just brings a little order in the complexity resulting from hand–coding the error handling logic. CCExceptions’s location mechanism has the following purposes:

  1. Implement non–local exits in a way that allows client source code to be shorter and simpler to understand.
  2. Implement non–local exit handlers to perform synchronous clean–up operations.
  3. Implement a simple architecture for exceptional–condition descriptors.

these features come at the cost of slowing down execution in a possibly sensible way (with respect to, for example, hand–coded goto instructions that jump to labels).

CCExceptions installs multiple header files, of which ccexceptions.h is the main one, exporting the whole library API. All the function names in the API are prefixed with cce_; all the preprocessor symbol names are prefixed with CCE_; all the type names are prefixed with cce_ and suffixed with _t.

IMPORTANT To use the library we must enable the POSIX features when including the standard header files; so either we include ccexceptions.h as first header, or we include the following definitions before including all the header files:

#define _POSIX_C_SOURCE         200809L

Next: , Previous: , Up: Top   [Contents][Index]

This document describes version 0.9.0-devel.3 of CCExceptions.