From 57bfbe4a09a898f11da686646164d3fdf3875123 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 13 Apr 2019 20:41:54 +0200 Subject: And man pages for the function, and add print function to user specifiec error details MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- liberror_get_error.3 | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 liberror_get_error.3 (limited to 'liberror_get_error.3') diff --git a/liberror_get_error.3 b/liberror_get_error.3 new file mode 100644 index 0000000..0aa9add --- /dev/null +++ b/liberror_get_error.3 @@ -0,0 +1,55 @@ +.TH LIBERROR_GET_ERROR 3 2019-04-13 liberror +.SH NAME +liberror_get_error \- get the current error for the thread +.SH SYNOPSIS +.nf +#include + +struct liberror_error *liberror_get_error(void); +.fi +.PP +Link with +.IR \-lerror . +.SH DESCRIPTION +The +.BR liberror_get_error () +function returns a pointer to the threads current +error. If the thread does not have an error assigned, +.I NULL +is returned. +.PP +After handling the error, call the +.BR liberror_reset_error (3) +function. +.SH RETURN VALUE +The +.BR liberror_get_error () +returns the error assigned to the thread, or +.I NULL +if none is assigned to the threa. Failure is impossible. +.PP +Note, this contents of this error will change when a new +error is assigned to the thread. +.SH ERRORS +None. +.SH EXAMPLES +None. +.SH APPLICATION USAGE +None. +.SH RATIONALE +None. +.SH FUTURE DIRECTIONS +None. +.SH NOTES +None. +.SH SEE ALSO +.BR liberror (7), +.BR liberror.h (0), +.BR liberror_copy_error (3), +.BR liberror_free_error (3), +.BR liberror_print_bactrace (3), +.BR liberror_print_error (3), +.BR liberror_reset_error (3), +.BR liberror_save_backtrace (3), +.BR liberror_set_error (3), +.BR liberror_set_error_errno (3) -- cgit v1.2.3-70-g09d2