|
cwist
Modern C web framework with libttak runtime
|
cwist_err.h interface. More...
#include <stdint.h>#include <stdbool.h>#include <cjson/cJSON.h>

Go to the source code of this file.
Classes | |
| struct | __prim_cwist_error_t |
| Internal union-like structure to store the actual error value. More... | |
| struct | cwist_error_t |
| Integrated error structure used throughout the system. More... | |
Typedefs | |
| typedef enum cwist_errtype_t | cwist_errtype_t |
| typedef struct __prim_cwist_error_t | __prim_cwist_error_t |
| typedef struct cwist_error_t | cwist_error_t |
Enumerations | |
| enum | cwist_errtype_t { CWIST_ERR_INT8 , CWIST_ERR_INT16 , CWIST_ERR_INT32 , CWIST_ERR_INT64 , CWIST_ERR_UINT8 , CWIST_ERR_UINT16 , CWIST_ERR_UINT32 , CWIST_ERR_UINT64 , CWIST_ERR_STRING , CWIST_ERR_JSON , CWIST_ERR_FLOAT , CWIST_ERR_DOUBLE } |
Functions | |
Functions | |
| cwist_error_t | make_error (cwist_errtype_t type) |
| Creates an error object initialized with the specified type. | |
| bool | cwist_error_is_ok_extern (const cwist_error_t *err) |
| Out-of-line cwist_error_is_ok(); see include/cwist/sys/err/cwist_err.h. | |
cwist_err.h interface.
Definition in file cwist_err.h.
Definition at line 13 of file cwist_err.h.
| bool cwist_error_is_ok_extern | ( | const cwist_error_t * | err | ) |
Out-of-line cwist_error_is_ok(); see include/cwist/sys/err/cwist_err.h.
Out-of-line cwist_error_is_ok(); see include/cwist/sys/err/cwist_err.h.
Forwards to the inline helper so the two can never disagree. Success means the active channel holds its zero/empty value; NULL counts as success and an unknown errtype counts as failure.
| err | Error object to test (may be NULL). |
err represents success. Definition at line 30 of file error.c.
References cap.
| cwist_error_t make_error | ( | cwist_errtype_t | type | ) |
Creates an error object initialized with the specified type.
| type | The type of error to create. |
Creates an error object initialized with the specified type.
| type | Error payload discriminator to store in the result. |
errtype set and the payload left for the caller to fill. Definition at line 14 of file error.c.
References cap.
Referenced by cwist_accept_socket(), cwist_app_reload_tls(), cwist_app_static(), cwist_app_static_with_cache(), cwist_app_use_db(), cwist_app_use_db_pool(), cwist_app_use_ech(), cwist_app_use_ex(), cwist_app_use_http2(), cwist_app_use_http3(), cwist_app_use_https(), cwist_app_use_https2(), cwist_app_use_https3(), cwist_app_use_nuke_db(), cwist_app_use_redis(), cwist_app_use_scheduler(), cwist_db_exec(), cwist_db_insert_healed(), cwist_db_open(), cwist_db_open_memory(), cwist_db_query(), cwist_db_query_strict(), cwist_db_serialize(), cwist_http2_serve_connection_ex(), cwist_http3_client_request(), cwist_http3_init_context(), cwist_http3_init_context_ephemeral(), cwist_http3_reload_context(), cwist_http3_server_loop(), cwist_http_client_request(), cwist_http_header_add(), cwist_http_response_send_file(), cwist_http_send_response(), cwist_http_send_response_head(), cwist_http_server_loop(), cwist_https_accept(), cwist_https_init_context_with_options(), cwist_https_reload_context(), cwist_https_send_response(), cwist_https_send_response_head(), cwist_https_server_loop(), cwist_nats_connect(), cwist_nats_publish_string(), cwist_nats_subscribe(), cwist_orm_delete(), cwist_orm_exec(), cwist_orm_insert(), cwist_orm_insert_returning_i64(), cwist_orm_insert_returning_json(), cwist_orm_query(), cwist_orm_query_typed(), cwist_orm_select(), cwist_orm_select_one_i64(), cwist_orm_select_one_json(), cwist_orm_update(), cwist_redis_auth(), cwist_redis_command(), cwist_redis_command_argv(), cwist_redis_command_argv_reply(), cwist_redis_del(), cwist_redis_expire(), cwist_redis_get(), cwist_redis_pool_command_argv(), cwist_redis_pool_del(), cwist_redis_pool_get(), cwist_redis_pool_publish(), cwist_redis_pool_set(), cwist_redis_pool_setex(), cwist_redis_publish(), cwist_redis_set(), cwist_redis_setex(), cwist_redis_subscribe(), cwist_sstring_adopt_len(), cwist_sstring_adopt_region(), cwist_sstring_append(), cwist_sstring_append_escaped(), cwist_sstring_append_len(), cwist_sstring_append_sstring(), cwist_sstring_append_sstring_escaped(), cwist_sstring_assign(), cwist_sstring_assign_len(), cwist_sstring_borrow(), cwist_sstring_change_size(), cwist_sstring_copy(), cwist_sstring_copy_sstring(), cwist_sstring_init(), cwist_sstring_init_escaped(), cwist_sstring_ltrim(), cwist_sstring_rtrim(), and cwist_sstring_seek().