diff options
author | Not Zed <NotZed@Ximian.com> | 2004-05-21 11:30:00 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-05-21 11:30:00 +0800 |
commit | cfa1f110a7dabe96457a17f0e42f632f8b111828 (patch) | |
tree | 7b698c3f5ddb7b9ec5769afb8d41cb98767549af /camel/camel-exception.c | |
parent | e660ab7c524cf5e753b3a867f04f3a0ea383517e (diff) | |
download | gsoc2013-evolution-cfa1f110a7dabe96457a17f0e42f632f8b111828.tar.gz gsoc2013-evolution-cfa1f110a7dabe96457a17f0e42f632f8b111828.tar.zst gsoc2013-evolution-cfa1f110a7dabe96457a17f0e42f632f8b111828.zip |
re-arrange the code so exception debug will print the expanded
2004-05-20 Not Zed <NotZed@Ximian.com>
* camel-exception.c (camel_exception_setv): re-arrange the code so
exception debug will print the expanded description.
(camel_exception_set): print exception debug.
* providers/pop3/camel-pop3-folder.c (pop3_get_message): same.
* providers/local/camel-mh-folder.c (mh_get_message) *
providers/local/camel-mbox-folder.c (mbox_get_message): *
providers/local/camel-maildir-folder.c (maildir_get_message):
Don't use INVALID_UID for errors which are more system related.
And sync up all the error messages.
svn path=/trunk/; revision=26028
Diffstat (limited to 'camel/camel-exception.c')
-rw-r--r-- | camel/camel-exception.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/camel/camel-exception.c b/camel/camel-exception.c index f6e6acf78b..fee7c541aa 100644 --- a/camel/camel-exception.c +++ b/camel/camel-exception.c @@ -166,6 +166,9 @@ camel_exception_set (CamelException *ex, ExceptionId id, const char *desc) { + if (camel_debug("exception")) + printf("CamelException.set(%p, %d, '%s')\n", ex, id, desc); + if (!ex) return; @@ -209,24 +212,24 @@ camel_exception_setv (CamelException *ex, ...) { va_list args; - char *old; + char *desc; + + va_start(args, format); + desc = g_strdup_vprintf (format, args); + va_end (args); if (camel_debug("exception")) - printf("CamelException.setv(%p, %d, '%s')\n", ex, id, format); + printf("CamelException.setv(%p, %d, '%s')\n", ex, id, desc); - if (!ex) + if (!ex) { + g_free(desc); return; + } CAMEL_EXCEPTION_LOCK(exception); - - old = ex->desc; - - va_start(args, format); - ex->desc = g_strdup_vprintf (format, args); - va_end (args); - g_free (old); - + g_free(ex->desc); + ex->desc = desc; ex->id = id; CAMEL_EXCEPTION_UNLOCK(exception); |