The following commit has been merged in the master branch:
commit 841f42173e5d0a97bbc9f184d781d2b2e6f9f974
Author: Guillem Jover <[email protected]>
Date: Sun Oct 17 05:47:34 2010 +0200
libdpkg: Add new push_error_context() function
This new function pushes a default error context.
diff --git a/lib/dpkg/ehandle.c b/lib/dpkg/ehandle.c
index 81d61ac..8f2a038 100644
--- a/lib/dpkg/ehandle.c
+++ b/lib/dpkg/ehandle.c
@@ -174,6 +174,12 @@ push_error_context_jump(jmp_buf *jump, error_printer
*printerror,
onerr_abort = 0;
}
+void
+push_error_context(void)
+{
+ push_error_context_func(catch_fatal_error, print_fatal_error, NULL);
+}
+
static void
print_cleanup_error(const char *emsg, const char *contextstring)
{
diff --git a/lib/dpkg/ehandle.h b/lib/dpkg/ehandle.h
index 4483e20..f498df2 100644
--- a/lib/dpkg/ehandle.h
+++ b/lib/dpkg/ehandle.h
@@ -52,6 +52,7 @@ void push_error_context_jump(jmp_buf *jbufp, error_printer
*printerror,
const char *contextstring);
void push_error_context_func(error_handler *func, error_printer *printerror,
const char *contextstring);
+void push_error_context(void);
void error_unwind(int flagset);
void push_cleanup(void (*f1)(int argc, void **argv), int flagmask1,
diff --git a/lib/dpkg/libdpkg.Versions b/lib/dpkg/libdpkg.Versions
index e70a0e5..06b3a31 100644
--- a/lib/dpkg/libdpkg.Versions
+++ b/lib/dpkg/libdpkg.Versions
@@ -11,6 +11,7 @@ LIBDPKG_PRIVATE {
# Error handling
push_error_context_jump;
push_error_context_func;
+ push_error_context;
print_fatal_error;
catch_fatal_error;
push_checkpoint;
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]