2007-05-09 Murray Cumming <murrayc@murrayc.com>
authorMurray Cumming <murrayc@murrayc.com>
Wed, 9 May 2007 12:04:09 +0000 (12:04 +0000)
committerMurray Cumming <murrayc@murrayc.com>
Wed, 9 May 2007 12:04:09 +0000 (12:04 +0000)
* src/modest-tny-account-store.c: (modest_tny_account_store_alert):
        Handle the new TNY_ACCOUNT_STORE_ERROR error domain. I will update the
        tinymail documentation to say that this can be expected.
        Handle the new TNY_ACCOUNT_STORE_ERROR_UNKNOWN_ALERT error code. It is not
        pretty, and should not happen, but I would prefer to know when it does.

pmo-trunk-r1800

ChangeLog2
src/modest-tny-account-store.c

index 5650d27..2f4195b 100644 (file)
@@ -1,5 +1,13 @@
 2007-05-09  Murray Cumming  <murrayc@murrayc.com>
 
+       * src/modest-tny-account-store.c: (modest_tny_account_store_alert):
+       Handle the new TNY_ACCOUNT_STORE_ERROR error domain. I will update the 
+       tinymail documentation to say that this can be expected.
+       Handle the new TNY_ACCOUNT_STORE_ERROR_UNKNOWN_ALERT error code. It is not 
+       pretty, and should not happen, but I would prefer to know when it does.
+
+2007-05-09  Murray Cumming  <murrayc@murrayc.com>
+
        * configure.ac: When using the older hildon version, probably on Bora, 
        require gnome-vfs-module-2.0, which is the old provider of gnome-vfs-mime.h,
        to fix the build.
index a6a5e4f..661f9dd 100644 (file)
@@ -624,7 +624,13 @@ modest_tny_account_store_alert (TnyAccountStore *self, TnyAlertType type,
                                const GError *error)
 {
        g_return_val_if_fail (error, FALSE);
-       g_return_val_if_fail (error->domain == TNY_ACCOUNT_ERROR, FALSE);
+
+       if ((error->domain != TNY_ACCOUNT_ERROR) 
+               && (error->domain != TNY_ACCOUNT_STORE_ERROR)) {
+               g_warning("%s: Unexpected error domain: != TNY_ACCOUNT_ERROR: %d, message=%s", 
+                       __FUNCTION__, error->domain, error->message); 
+               return FALSE;
+       }
        
        /* printf("DEBUG: %s: error->message=%s\n", __FUNCTION__, error->message); */
        
@@ -652,8 +658,12 @@ modest_tny_account_store_alert (TnyAccountStore *self, TnyAlertType type,
                case TNY_ACCOUNT_ERROR_TRY_CONNECT:
                        prompt = _("Modest account not yet fully configured");
                        break;
+               case TNY_ACCOUNT_STORE_ERROR_UNKNOWN_ALERT:
+                       prompt = _("Unknown Tinymail error (TNY_ACCOUNT_STORE_ERROR_UNKNOWN_ALERT)");
+                       break;
                default:
-                       g_warning ("%s: Unhandled GError code.", __FUNCTION__);
+                       g_warning ("%s: Unhandled GError code: %d, message=%s", 
+                               __FUNCTION__, error->code, error->message);
                        prompt = NULL;
                break;
        }