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.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/camel/camel-exception.c b/camel/camel-exception.c
index a983150612..1e75e90d17 100644
--- a/camel/camel-exception.c
+++ b/camel/camel-exception.c
@@ -38,7 +38,7 @@
* Return value: The newly allocated exception object.
**/
CamelException *
-camel_exception_new ()
+camel_exception_new (void)
{
CamelException *ex;
@@ -51,6 +51,26 @@ camel_exception_new ()
return ex;
}
+/**
+ * camel_exception_init: init a (statically allocated) exception.
+ *
+ * Init an exception. This routine is mainly
+ * useful when using a statically allocated
+ * exception.
+ *
+ *
+ **/
+void
+camel_exception_init (CamelException *ex)
+{
+ ex->desc = NULL;
+
+ /* set the Exception Id to NULL */
+ ex->id = CAMEL_EXCEPTION_NONE;
+
+ return ex;
+}
+
/**
* camel_exception_clear: Clear an exception