aboutsummaryrefslogtreecommitdiffstats
path: root/liberror.7
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2019-04-13 21:16:07 +0200
committerMattias Andrée <maandree@kth.se>2019-04-13 21:16:07 +0200
commit5d887f76881df723864afae7278e7ac2531e96c4 (patch)
tree80a735f209a6f681de6dbbe7704a360cdb2cea61 /liberror.7
parentInstall and uninstall man pages (diff)
downloadliberror-5d887f76881df723864afae7278e7ac2531e96c4.tar.gz
liberror-5d887f76881df723864afae7278e7ac2531e96c4.tar.bz2
liberror-5d887f76881df723864afae7278e7ac2531e96c4.tar.xz
Add liberror.7
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--liberror.780
1 files changed, 80 insertions, 0 deletions
diff --git a/liberror.7 b/liberror.7
new file mode 100644
index 0000000..cfa4cc3
--- /dev/null
+++ b/liberror.7
@@ -0,0 +1,80 @@
+.TH LIBERROR 7 2019-04-13 liberror
+.SH NAME
+liberror \- single interface for custom and standard errors
+.SH SYNOPSIS
+.nf
+#include <liberror.h>
+.fi
+.PP
+Link with
+.IR \-lerror .
+.SH DESCRIPTION
+The
+.B liberror
+library provides a single interface for error handling.
+Specifically this is intended for cases where some
+errors are
+.I errno
+errors or other
+.B libc
+errors and there are library-specific, maybe for
+multiple libraries, errors.
+.PP
+The errors are thread-local, support error description,
+error source string (which function failed), and error
+code with error code group (e.g. \(dqerrno\(dq,
+\(dqaddrinfo\(dq or a library name), as well as cause
+chains, extended details, and if linked together with
+.BR liberror-backtrace ,
+backtraces.
+.PP
+The important functions are:
+.TP
+.BR liberror_get_error (3)
+Get error for the calling thread.
+.TP
+.BR liberror_set_error (3)
+Set error for the calling thread.
+.TP
+.BR liberror_set_error_errno (3)
+Wrapper for the
+.BR liberror_set_error (3)
+function for
+.I errno
+errors.
+.TP
+.BR liberror_reset_error (3)
+Remove error for the calling thread, needed because the
+.BR liberror_set_error (3)
+function otherwise stores the error as the cause of the
+new error.
+.TP
+.BR liberror_print_error (3)
+Print the error for the calling thread, include its
+backtrace if the
+.B liberror-backtrace
+library is also linked, the errors cause, and optionally
+remove the error for the calling 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.h (0),
+.BR liberror_copy_error (3),
+.BR liberror_free_error (3),
+.BR liberror_get_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)