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


6.5 The unknown exceptional–condition object

The unknown exceptional–condition object–type has the purpose of describing an exceptional–condition with unknown cause; it should be used only by the function cce_raise() when the condition object argument is set to NULL.

There should be only one unknown exceptional–condition object: the one predefined by CCExceptions and built into the library as statically allocated structure. Subtyping from the unknown type is discouraged.

All the following definitions are accessible from the header file ccexceptions.h.

Struct Typedef: cce_descriptor_unknown_t

Structure type representing the exceptional–condition object–type descriptor. This descriptor has the descriptor cce_descriptor_root_t as parent. It has the following public fields:

cce_descriptor_t descriptor

Core values of the exceptional–condition object–type descriptor.

Struct Typedef: cce_condition_unknown_t

Structure type representing the exceptional–condition object. It has the following public fields:

cce_condition_root_t root

Core values of the exceptional–condition object.

Function: cce_condition_t const * cce_condition_new_unknown (void)

Return a pointer to the predefined, statically allocated, structure representing the exceptional–condition object of type cce_condition_unknown_t.

Function: bool cce_condition_is_unknown (cce_condition_t const * C)

Return true if the exceptional–condition object referenced by C is of type cce_condition_unknown_t or it is derived from it; otherwise return false.

Facilities to derive an exceptional–condition object subtype

When deriving a subtype from cce_condition_unknown_t we need the following functions.

Function: void cce_descriptor_set_parent_to(cce_descriptor_unknown_t) (cce_descriptor_t * D)

Mutate the exceptional–condition object–type descriptor referenced by D so that its parent is the descriptor of cce_descriptor_unknown_t. We should call this function in the initialisation module of the derived type.

Function: void cce_condition_init_unknown (cce_condition_unknown_t * C)

Initialise an already allocated exceptional–condition object. We should call this function from the initialisation function of the derived type.


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

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