diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-12-22 02:47:07 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-12-22 02:47:07 +0100 |
commit | db9f741875ad1fd3c7c3e5b932420081862159bc (patch) | |
tree | 03962b496e79b041ee1a0d503090a4fd9457739b /src/common/error.h | |
parent | 5fa28dc2b871b11f93d4206bea2780262f85af5e (diff) | |
download | blogc-db9f741875ad1fd3c7c3e5b932420081862159bc.tar.gz blogc-db9f741875ad1fd3c7c3e5b932420081862159bc.tar.bz2 blogc-db9f741875ad1fd3c7c3e5b932420081862159bc.zip |
wip
Diffstat (limited to 'src/common/error.h')
-rw-r--r-- | src/common/error.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/error.h b/src/common/error.h index 2aac439..ccb4228 100644 --- a/src/common/error.h +++ b/src/common/error.h @@ -9,6 +9,7 @@ #ifndef _ERROR_H #define _ERROR_H +#include <stdarg.h> #include <stddef.h> // error handling is centralized here for the sake of simplicity :/ @@ -38,7 +39,14 @@ typedef struct { } bc_error_t; bc_error_t* bc_error_new(bc_error_type_t type, const char *msg); +bc_error_t* bc_error_new_vprintf(bc_error_type_t type, const char *format, va_list ap); bc_error_t* bc_error_new_printf(bc_error_type_t type, const char *format, ...); +bc_error_t* bc_error_new_errno_vprintf(bc_error_type_t type, int errno_, + const char *format, va_list ap); +bc_error_t* bc_error_new_errno_printf(bc_error_type_t type, int errno_, + const char *format, ...); +bc_error_t* bc_error_new_default_errno_printf(bc_error_type_t type, + const char *format, ...); bc_error_t* bc_error_parser(bc_error_type_t type, const char *src, size_t src_len, size_t current, const char *format, ...); void bc_error_print(bc_error_t *err, const char *prefix); |