Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Structures | Macros | Typedefs | Functions
afw_error.c File Reference

Adaptive Framework Error Handling. More...

#include "afw_internal.h"

Go to the source code of this file.

Data Structures

struct  impl_error_code_map_s
 

Macros

#define XX(id, error_allow_in_response, http_response_code, description)
 

Typedefs

typedef struct impl_error_code_map_s impl_error_code_map_t
 

Functions

 afw_error_rv_set_z (afw_error_code_t code, const afw_utf8_z_t *rv_source_id_z, int rv, const afw_utf8_z_t *source_z, const afw_utf8_z_t *message_z, afw_xctx_t *xctx)
 
 afw_error_set_z (afw_error_code_t code, const afw_utf8_z_t *source_z, const afw_utf8_z_t *message_z, afw_xctx_t *xctx)
 
 afw_error_rv_set_fz (afw_error_code_t code, const afw_utf8_z_t *rv_source_id_z, int rv, const afw_utf8_z_t *source_z, afw_xctx_t *xctx, const afw_utf8_z_t *format_z,...)
 
 afw_error_set_fz (afw_error_code_t code, const afw_utf8_z_t *source_z, afw_xctx_t *xctx, const afw_utf8_z_t *format_z,...)
 
 afw_error_rv_set_vz (afw_error_code_t code, const afw_utf8_z_t *rv_source_id_z, int rv, const afw_utf8_z_t *source_z, const afw_utf8_z_t *format_z, va_list ap, afw_xctx_t *xctx)
 
 afw_error_set_vz (afw_error_code_t code, const afw_utf8_z_t *source_z, const afw_utf8_z_t *format_z, va_list ap, afw_xctx_t *xctx)
 
 afw_error_to_utf8 (const afw_error_t *error, const afw_pool_t *p, afw_xctx_t *xctx)
 Convert error to utf8. More...
 
 afw_error_write_log (afw_log_priority_t priority, const afw_error_t *error, afw_xctx_t *xctx)
 Write error to environment log. More...
 
 afw_error_print (FILE *fp, const afw_error_t *error)
 Print error. More...
 
 afw_error_print_with_xctx (FILE *fp, const afw_error_t *error, const afw_pool_t *p, afw_xctx_t *xctx)
 Print error when xctx is available. More...
 
void afw_error_add_to_object (const afw_object_t *object, const afw_error_t *error, afw_xctx_t *xctx)
 Add error info to existing object using specified pool. More...
 
const afw_object_tafw_error_to_object (const afw_error_t *error, const afw_pool_t *p, afw_xctx_t *xctx)
 Create an object with error info in specified pool. More...
 
 afw_error_message_vz (const afw_utf8_z_t *format, va_list ap, afw_xctx_t *xctx)
 Build message in xctx error message_wa and return pointer. More...
 
 afw_error_message (afw_xctx_t *xctx, const afw_utf8_z_t *format,...)
 Build message in xctx error message_wa and return pointer. More...
 
 afw_error_http_status (const afw_error_t *error)
 Returns http status for error. More...
 
 afw_error_code_id_z (const afw_error_t *error)
 Returns error->code id. More...
 
 afw_error_allow_in_response (afw_error_code_t code)
 Determine if the error object for code is allowed in HTTP response. More...
 

Detailed Description

Adaptive Framework Error Handling.

Definition in file afw_error.c.

Macro Definition Documentation

◆ XX

#define XX (   id,
  error_allow_in_response,
  http_response_code,
  description 
)
Value:
{ \
AFW_UTF8_LITERAL( #id ), \
error_allow_in_response, \
http_response_code, \
AFW_UTF8_LITERAL( #description ), \
AFW_UTF8_LITERAL( #http_response_code " " #description ) \
},