aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/addressbook-component.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/component/addressbook-component.c')
-rw-r--r--addressbook/gui/component/addressbook-component.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c
index ad43ba8f27..e74b0d7dda 100644
--- a/addressbook/gui/component/addressbook-component.c
+++ b/addressbook/gui/component/addressbook-component.c
@@ -170,10 +170,22 @@ impl_requestCreateItem (PortableServer_Servant servant,
e_book_async_get_default_addressbook (book_loaded_cb, g_strdup (item_type_name));
}
-static CORBA_boolean
+static void
impl_upgradeFromVersion (PortableServer_Servant servant, short major, short minor, short revision, CORBA_Environment *ev)
{
- return addressbook_migrate (addressbook_component_peek (), major, minor, revision);
+ GError *err = NULL;
+
+ if (!addressbook_migrate (addressbook_component_peek (), major, minor, revision, &err)) {
+ GNOME_Evolution_Component_UpgradeFailed *failedex;
+
+ failedex = GNOME_Evolution_Component_UpgradeFailed__alloc();
+ failedex->what = CORBA_string_dup(_("Failed upgrading Addressbook settings or folders."));
+ failedex->why = CORBA_string_dup(err->message);
+ CORBA_exception_set(ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Component_UpgradeFailed, failedex);
+ }
+
+ if (err)
+ g_error_free(err);
}
static CORBA_boolean