1#ifndef _CCS_ERROR_STACK_H
2#define _CCS_ERROR_STACK_H
151 const char **message_ret);
195 size_t *num_elems_ret);
struct _ccs_error_stack_s * ccs_error_stack_t
An opaque type defining a CCS error stack.
Definition base.h:155
enum ccs_result_e ccs_result_t
A commodity type to represent CCS errors and returned by most functions.
Definition base.h:247
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_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_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.
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_set_thread_error(ccs_error_stack_t error_stack)
Transfers ownership of error stack from the user to CCS.
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_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_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_get_code(ccs_error_stack_t error_stack, ccs_result_t *error_code_ret)
Retrieves the error code from an error stack.
ccs_error_stack_t ccs_get_thread_error(void)
Transfers ownership of thread error stack from CCS to the user.
An element of stack.
Definition error_stack.h:47
const char * func
The function name.
Definition error_stack.h:53
int line
The line number.
Definition error_stack.h:51
const char * file
The file name.
Definition error_stack.h:49