Note: | |||
The comparison operator == can be used to test whether an XCLE_Exception | |||
is the same as XCLE_EXCEPTION_OK (since this is a static pointer value). |
Args: | |||
_ ident | : error identifier number | ||
_ messg | : description of the error |
Returns: | |||
_ NULL | : if the memory could not be allocated | ||
_ XCLE_EXCEPTION_OK | : XCLE_ExceptionNew(0,NULL) | ||
else a new XCLE_Exception. |
Errors: | |||
_ ENOMEM | : if new memory could not be allocated |
Args: | |||
_ exp | : the original exception |
Returns: | |||
_ NULL | : if the memory could not be allocated | ||
_ XCLE_EXCEPTION_OK | : if XCLE_EXCEPTION_OK was passed as argument | ||
else a new XCLE_Exception. |
Errors: | |||
_ ENOMEM | : if new memory could not be allocated | ||
_ EINVAL | : if a NULL XCLE_Exception was passed as argument |
Args: | |||
_ exp | : the exception |
Returns: | |||
_ -1 | : if a NULL XCLE_Exception was passed as argument | ||
_ 0 | : if XCLE_EXCEPTION_OK was passed as argument | ||
else the exception's error identifier |
Errors: | |||
_ EINVAL | : if a NULL XCLE_Exception was passed as argument |
Args: | |||
_ exp | : the exception |
Returns: | |||
_ NULL | : if a NULL XCLE_Exception was passed as argument | ||
_ "" | : if XCLE_EXCEPTION_OK was passed as argument | ||
else the exception's message string |
Errors: | |||
_ EINVAL | : if a NULL XCLE_Exception was passed as argument |
Args: | |||
_ exp | : XCLE_Exception to free |
Note: | |||
Freeing XCLE_EXCEPTION_OK using XCLE_ExceptionFree does nothing |
Args: | |||
_ chksz | : the chunk size used for the exception stack |
Returns: | |||
_ NULL | : if the memory could not be allocated | ||
else a new, empty, execution context. |
Errors: | |||
_ ENOMEM | : if new memory could not be allocated |
Args: | |||
_ ctx | : the execution context to free |
Args: | |||
_ ctx | : the execution context | ||
_ src | : the name of the calling code | ||
_ exp | : the exception to throw |
Returns: | |||
_ NULL | : if 'ctx', 'src', or 'exp' were NULL | ||
else the original context, with the exception added to the pending queue |
Errors: | |||
_ ENOMEM | : if new memory could not be allocated | ||
_ EINVAL | : if 'ctx', 'src', or 'exp' were NULL |
Note: | |||
Nothing is done if exp is XCLE_EXCEPTION_OK. |
Args: | |||
_ ctx | : the execution context |
Returns: | |||
_ NULL | : if the execution context was NULL | ||
_ XCLE_EXCEPTION_OK | : if no exception was pending in this context | ||
else the last thrown exception |
Errors: | |||
_ EINVAL | : if the execution context was NULL |
Args: | |||
_ ctx | : the execution context |
Returns: | |||
_ NULL | : if the execution context was NULL | ||
else the original execution context |
Errors: | |||
_ EINVAL | : if the execution context was NULL |
Args: | |||
_ ctx | : the execution context | ||
_ map | : the mapping handler | ||
_ dat | : user-data pointer |
Returns: | |||
_ NULL | : if the execution context or the map handler were NULL | ||
else the sum of all values returned by 'map' |
Errors: | |||
_ EINVAL | : if the execution context or the map handler were NULL |
Note: | |||
The map handler takes, in order, the informations pertaining to the exception's | |||
calling code, and the exception nature: | |||
_ lev | : the depth of the currently mapped exception (0 for the root exception) | ||
_ src | : the name of the calling code | ||
_ idt | : the exception's identification number | ||
_ msg | : the exception's description | ||
_ dat | : user-defined data pointer (the last argument of XCLE_ExecCtxMapExceptions) |
: |
Args: | |||
_ ctx | : execution context | ||
_ stk | : Stack environment | ||
_ dom | : Variables environment | ||
_ obj | : Object to execute |
Returns: | |||
_ NULL | : if a NULL Stack, Hash or Object was passed as argument | ||
_ XCLE_EXCEPTION_OK | : if the execution terminated normally | ||
else the last exception thrown in this context. |
Errors: | |||
_ EINVAL | : if a NULL Stack, Hash or Object was passed as argument |
Args: | |||
_ ctx | : execution context | ||
_ stk | : Stack environment | ||
_ dom | : Variables environment | ||
_ lst | : list to execute |
Returns: | |||
_ NULL | : if a NULL Stack, Hash or Object was passed as argument | ||
_ XCLE_EXCEPTION_OK | : if the execution terminated normally | ||
else the last exception thrown in this context. |
Errors: | |||
_ EINVAL | : if a NULL Stack, Hash or Object was passed as argument |
Args: | |||
_ ctx | : execution context | ||
_ stk | : Stack environment | ||
_ dom | : Variables environment | ||
_ cod | : code to execute |
Returns: | |||
_ NULL | : if a NULL Stack, Hash or Object was passed as argument | ||
_ XCLE_EXCEPTION_OK | : if the execution terminated normally | ||
else the last exception thrown in this context. |
Errors: | |||
_ EINVAL | : if a NULL Stack, Hash or Object was passed as argument |