aboutsummaryrefslogtreecommitdiffstats
path: root/liberror.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2020-06-09 18:38:43 +0200
committerMattias Andrée <maandree@kth.se>2020-06-09 18:38:43 +0200
commit22ae5a6a98ec6aa98207bddc37a1200ea74d134b (patch)
treeeedbf11d6fb597573a3b6d1a55571af8c5fa57ca /liberror.h
parentFix filename typo (diff)
downloadliberror-22ae5a6a98ec6aa98207bddc37a1200ea74d134b.tar.gz
liberror-22ae5a6a98ec6aa98207bddc37a1200ea74d134b.tar.bz2
liberror-22ae5a6a98ec6aa98207bddc37a1200ea74d134b.tar.xz
Add liberror_pop_error and liberror_set_error_existing
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'liberror.h')
-rw-r--r--liberror.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/liberror.h b/liberror.h
index 1e57502..4d222e6 100644
--- a/liberror.h
+++ b/liberror.h
@@ -354,6 +354,24 @@ void liberror_set_error(const char[256], const char[64], const char[64], long lo
void liberror_set_error_errno(const char[256], const char[64], int);
/**
+ * Remove the current error and, if the
+ * specified error is non-`NULL`, replace it
+ * with the the specified error
+ *
+ * @param error The error to set as the current error, must not
+ * be the pointer returned by liberror_get_error()
+ * for any thread, including the current thread,
+ * the function will copy and deallocate this error
+ */
+void liberror_set_error_existing(struct liberror_error *);
+
+/**
+ * Remove the current error and, if the error
+ * has a cause, replace it with its cause
+ */
+void liberror_pop_error(void);
+
+/**
* The an error, its backtrace, and its
* cause (recursively)
*