aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-exception.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-exception.c')
-rw-r--r--camel/camel-exception.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/camel/camel-exception.c b/camel/camel-exception.c
index 961034cd78..e385e6c8a0 100644
--- a/camel/camel-exception.c
+++ b/camel/camel-exception.c
@@ -126,6 +126,60 @@ camel_exception_set (CamelException *ex,
}
+/**
+ * camel_exception_setv: set an exception
+ * @ex: exception object
+ * @id: exception id
+ * @format: format of the description string. The format string is used as in printf().
+ *
+ * Set the value of an exception. The exception id is
+ * a unique number representing the exception. The
+ * textual description is a small text explaining
+ * what happened and provoked the exception.
+ * In this version, the string is created from the format
+ * string and the variable argument list.
+ *
+ * When @ex is NULL, nothing is done, this routine
+ * simply returns.
+ *
+ **/
+void
+camel_exception_setv (CamelException *ex,
+ ExceptionId id,
+ const char *format,
+ ...)
+{
+ va_list args;
+ gchar *tmp_desc_string;
+
+
+ /* if no exception is given, do nothing */
+ if (!ex) return;
+
+
+ /* create the temporary exception string */
+ va_start(args, format);
+ tmp_desc_string = g_strdup_vprintf (format, args);
+ va_end (args);
+
+
+ /* now set the exception. We don't call
+ camel_exception_set because we want to
+ avoid a useless strdup () */
+ ex->id = id;
+
+ /* remove the previous exception description */
+ if (ex->desc)
+ g_free (ex->desc);
+ ex->desc = g_strdup (tmp_desc_string);
+
+}
+
+
+
+
+
+
/**
* camel_exception_xfer: transfer an exception
ome-3.24&id=bdf9fa8f4cf64dedb492bb534b8ca27c2b64ef3c'>Update master site.lawrance2006-11-051-2/+2 * Make polish/ekg not install libgadu.so and use the one provided withitetcu2006-07-293-18/+21 * Replace ugly "@unexec rmdir %D... 2>/dev/null || true" with @dirrmtryedwin2006-01-221-2/+2 * - Update to 1.6pav2005-11-122-7/+7 * - Change second category to be net-impav2005-11-101-1/+1 * - Update to 1.6r3pav2005-07-202-4/+4 * - Update to 1.6r2pav2005-07-172-5/+5 * - update polish/ekg to version 1.6rc1leeym2005-04-163-24/+23 * Fix plist.krion2005-01-151-0/+2 * Chase libaspell to aspell.16.thierry2004-08-291-2/+2 * Fix build with gcc-3.4krion2004-08-041-0/+2 * - OpenSSL is special on FreeBSD, it's always there, and is not visiblepav2004-07-222-0/+11 * - Update to 1.5pav2004-07-062-4/+4 * Back out accidental modification.lofi2004-06-101-2/+1 * Update to version 3.2.3lofi2004-06-101-0/+1 * - Update to ekg-1.4.20040505pav2004-05-102-6/+13 * - Update to 20040208 snapshotpav2004-02-142-4/+4 * Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-041-0/+1 * Update to 1.4arved2003-11-193-8/+9 * Update ekg to new version.jeh2003-11-092-3/+3 * - Update to version 20031003krion2003-10-063-49/+14 * update polish/ekg-1.1 -> ekg-1.3edwin2003-09-242-2/+2 * - Update the Categories after Repocopy.arved2003-08-191-1/+1 * Add ekg, a client for the polish IM System gadu-gaduarved2003-07-21