diff options
author | Mattias Andrée <maandree@kth.se> | 2020-06-09 18:41:42 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2020-06-09 18:45:24 +0200 |
commit | 6653b2827cc8701360c6650865d5d2f7e8fbae88 (patch) | |
tree | 3b83ce5afee7e716b34a1f2556c9eadbd925acc6 | |
parent | Add liberror_pop_error and liberror_set_error_existing (diff) | |
download | liberror-6653b2827cc8701360c6650865d5d2f7e8fbae88.tar.gz liberror-6653b2827cc8701360c6650865d5d2f7e8fbae88.tar.bz2 liberror-6653b2827cc8701360c6650865d5d2f7e8fbae88.tar.xz |
Update liberror.7, liberror.h.0, and README
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | README | 19 | ||||
-rw-r--r-- | liberror.7 | 9 | ||||
-rw-r--r-- | liberror.h.0 | 11 |
3 files changed, 31 insertions, 8 deletions
@@ -13,18 +13,25 @@ together with liberror-backtrace, backtraces. The important functions are: liberror_get_error - Get error for the calling thread + Get error for the calling thread. liberror_set_error - Set error for the calling thread + Set error for the calling thread. liberror_set_error_errno - Wrapper for liberror_set_error for errno errors + Wrapper for liberror_set_error for errno errors. + + liberror_set_error_existing + Set error for the calling thread to a saved error. + + liberror_pop_error + Set error for the calling thread to the + current error's cause. liberror_reset_error Remove error for the calling thread, needed because `liberror_set_error` otherwise stores - the error as the cause of the new error + the error as the cause of the new error. liberror_print_error Print the error for the calling thread, include @@ -33,7 +40,7 @@ The important functions are: the error for the calling thread. liberror_start - Shall be called when entering a signal handler + Shall be called when entering a signal handler. liberror_end - Shall be called when a signal handler exits + Shall be called when a signal handler exits. @@ -1,4 +1,4 @@ -.TH LIBERROR 7 2019-04-13 liberror +.TH LIBERROR 7 2020-06-09 liberror .SH NAME liberror \- single interface for custom and standard errors .SH SYNOPSIS @@ -43,6 +43,13 @@ function for .I errno errors. .TP +.BR liberror_set_error_existing(3) +Set error for the calling thread to a saved error. +.TP +.BR liberror_pop_error(3) +Set error for the calling thread to the current +error's cause. +.TP .BR liberror_reset_error (3) Remove error for the calling thread, needed because the .BR liberror_set_error (3) diff --git a/liberror.h.0 b/liberror.h.0 index e7759c5..602f482 100644 --- a/liberror.h.0 +++ b/liberror.h.0 @@ -1,4 +1,4 @@ -.TH LIBERROR.H 0 2019-04-13 liberror +.TH LIBERROR.H 0 2020-06-09 liberror .SH NAME liberror.h \- single interface for custom and standard errors .SH SYNOPSIS @@ -59,6 +59,8 @@ void liberror_print_backtrace(struct liberror_error *, FILE *, const char *); int liberror_save_backtrace(struct liberror_error *); void liberror_set_error(const char[256], const char[64], const char[64], long long int); void liberror_set_error_errno(const char[256], const char[64], int); +void liberror_set_error_existing(struct liberror_error *); +void liberror_pop_error(void); void liberror_print_error(struct liberror_error *, FILE *, int, const char *); void liberror_start(struct liberror_state *); void liberror_end(const struct liberror_state *); @@ -282,6 +284,13 @@ for errors with .I errno values. .TP +.BR liberror_set_error_existing (3) +Set error for the calling thread to a saved error. +.TP +.BR liberror_pop_error (3) +Set error for the calling thread to the current +error's cause. +.TP .BR liberror_print_error (3) Print an error, by default the calling thread's current error, if any, including description, |