Next: conditions math, Previous: conditions unreachable, Up: conditions [Contents][Index]
errno exceptional–condition objectThe errno exceptional–condition object–type has the purpose of describing an exceptional
condition caused by a system function setting errno. This exceptional–condition
object–type is not meant to be subtyped.
All the following definitions are accessible from the header file ccexceptions.h.
Structure type representing the exceptional–condition object–type descriptor. This descriptor has
the descriptor cce_descriptor_runtime_error_t as parent. It has the following public fields:
cce_descriptor_t descriptorCore values of the exceptional–condition object–type descriptor.
Structure type representing an errno exceptional–condition object, signalled by a system
function by setting errno to a non–zero value. It has the following public fields:
cce_condition_runtime_error_t runtime_errorCore values of the exceptional–condition object–type descriptor.
int errnumThe value of errno.
char const * messageA statically allocated ASCIIZ string describing the error.
Given the errno code errnum, return a pointer to the exceptional–condition object
associated to it.
If errnum is zero: return a pointer to an exceptional–condition object representing a
successful operation. If errnum is not a valid errno code for the underlying platform:
return a pointer to an exceptional–condition object representing an invalid code.
Consume the current value of errno and return the return value of
cce_condition_new_errno() applied to it. Before returning: errno is reset to zero.
Return true if the exceptional–condition object referenced by C is of type
cce_condition_errno_t or it is derived from it; otherwise return
false.
Return true if the exceptional–condition object referenced by C is of type
cce_condition_errno_t, or it is derived from it, and its error code equals
errnum; otherwise return false.
When deriving a subtype from cce_condition_errno_t we need the
following functions.
Mutate the exceptional–condition object–type descriptor referenced by D so that its parent
is the descriptor of cce_descriptor_errno_t. We should call this function
in the initialisation module of the derived type.
Initialise an already allocated exceptional–condition object. We should call this function from the initialisation function of the derived type.
Return the value of the field errnum in the exceptional–condition object referenced by
C, which must be of type cce_condition_errno_t
Return the value of the field message in the exceptional–condition object referenced by
C, which must be of type cce_condition_errno_t
Next: conditions math, Previous: conditions unreachable, Up: conditions [Contents][Index]
This document describes version 0.9.0-devel.3 of CCExceptions.