|
C Configuration Space and Tuning Library (CCS)
|
CCS rich error reporting. More...

Go to the source code of this file.
Data Structures | |
| struct | ccs_error_stack_elem_s |
| An element of stack. More... | |
Typedefs | |
| typedef struct ccs_error_stack_elem_s | ccs_error_stack_elem_t |
| A commodity type to represent a CCS stack element. | |
Functions | |
| ccs_error_stack_t | ccs_get_thread_error (void) |
| Transfers ownership of thread error stack from CCS to the user. | |
| ccs_result_t | ccs_set_thread_error (ccs_error_stack_t error_stack) |
| Transfers ownership of error stack from the user to CCS. | |
| void | ccs_clear_thread_error (void) |
| Clears the error stack of the calling thread, releasing the current error if it existed. | |
| ccs_result_t | ccs_create_thread_error (ccs_result_t error_code, const char *msg,...) |
| Creates a new error stack and sets it for the current thread, potentially replacing the previous one. | |
| ccs_result_t | ccs_thread_error_stack_push (const char *file, int line, const char *func) |
| Pushes a stack trace element on the thread error stack. | |
| ccs_result_t | ccs_create_error_stack (ccs_error_stack_t *error_stack_ret, ccs_result_t error_code, const char *msg,...) |
| Creates a new error stack object. | |
| ccs_result_t | ccs_error_stack_push (ccs_error_stack_t error_stack, const char *file, int line, const char *func) |
| Pushes a stack trace element in an error stack. | |
| ccs_result_t | ccs_error_stack_get_message (ccs_error_stack_t error_stack, const char **message_ret) |
| Retrieves the message from an error stack. | |
| ccs_result_t | ccs_error_stack_get_code (ccs_error_stack_t error_stack, ccs_result_t *error_code_ret) |
| Retrieves the error code from an error stack. | |
| ccs_result_t | ccs_error_stack_get_elems (ccs_error_stack_t error_stack, size_t num_elems, ccs_error_stack_elem_t *elems, size_t *num_elems_ret) |
| Retrieves the stack elements from an error stack. | |
CCS rich error reporting.
|
extern |
Clears the error stack of the calling thread, releasing the current error if it existed.
|
extern |
Creates a new error stack object.
| [out] | error_stack_ret | a pointer to the variable that will contain the newly created error stack. |
| [in] | error_code | the CCS error code |
| [in] | msg | a format string for the error message |
| [in] | ... | a list of optional values to fill the format string |
error_stack_ret is NULL
|
extern |
Creates a new error stack and sets it for the current thread, potentially replacing the previous one.
| [in] | error_code | the CCS error code |
| [in] | msg | a format string for the error message |
| [in] | ... | a list of optional values to fill the format string |
|
extern |
Retrieves the error code from an error stack.
| [in] | error_stack | |
| [out] | error_code_ret | a pointer to a variable that will contain the error code. |
error_stack is not a valid CCS error stack error_code_ret is NULL
|
extern |
Retrieves the stack elements from an error stack.
| [in] | error_stack | |
| [in] | num_elems | the size of the elems array |
| [out] | elems | an array of size num_elems to hold the returned stack elements, or NULL. If the array is too big, extra elements will be zeroed out |
| [out] | num_elems_ret | a pointer to a variable that will contain the number of stack elements that are or would be returned. Can be NULL |
error_stack is not a valid CCS error stack elems is NULL and num_elems is greater than 0; or if elems is NULL and num_elems_ret is NULL; or if num_elems is less than the number of elements that would be returned
|
extern |
Retrieves the message from an error stack.
| [in] | error_stack | |
| [out] | message_ret | a pointer to a variable that will contain the message. |
error_stack is not a valid CCS error stack message_ret is NULL
|
extern |
Pushes a stack trace element in an error stack.
A call to this function may invalidate pointers obtained previously by ccs_error_stack_get_elems for this error stack.
| [in,out] | error_stack | |
| [in] | file | the name of the file |
| [in] | line | the line number |
| [in] | func | the function name |
error_stack is not a valid CCS error stack
|
extern |
Transfers ownership of thread error stack from CCS to the user.
|
extern |
Transfers ownership of error stack from the user to CCS.
If a previous error was owned by the thread it will be released.
| [in] | error_stack | the error stack to transfer |
error_stack is not a valid CCS error stack
|
extern |
Pushes a stack trace element on the thread error stack.
| [in] | file | the name of the file |
| [in] | line | the line number |
| [in] | func | the function name |