diff options
author | Not Zed <NotZed@Ximian.com> | 2004-05-12 11:32:19 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-05-12 11:32:19 +0800 |
commit | 63ca6c19ab323142c1362afe95f6acf1259d2ecf (patch) | |
tree | 7fc3bc513a980f35e126543154dd908ae1b1a448 /calendar/gui/calendar-component.c | |
parent | 97a9bd320d00f4a194d6948cf9d54435b04a331e (diff) | |
download | gsoc2013-evolution-63ca6c19ab323142c1362afe95f6acf1259d2ecf.tar.gz gsoc2013-evolution-63ca6c19ab323142c1362afe95f6acf1259d2ecf.tar.zst gsoc2013-evolution-63ca6c19ab323142c1362afe95f6acf1259d2ecf.zip |
add GError return for error details & return errors.
2004-05-11 Not Zed <NotZed@Ximian.com>
* gui/migration.c (migrate_calendars, migrate_tasks): add GError
return for error details & return errors.
* gui/calendar-component.c (impl_upgradeFromVersion): fix for api
change, and erturn exception if we need to.
svn path=/trunk/; revision=25865
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r-- | calendar/gui/calendar-component.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 28500e7001..74cd196560 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -606,18 +606,27 @@ conf_changed_callback (GConfClient *client, /* Evolution::Component CORBA methods. */ -static CORBA_boolean +static void impl_upgradeFromVersion (PortableServer_Servant servant, CORBA_short major, CORBA_short minor, CORBA_short revision, CORBA_Environment *ev) { + GError *err = NULL; CalendarComponent *calendar_component = CALENDAR_COMPONENT (bonobo_object_from_servant (servant)); - migrate_calendars (calendar_component, major, minor, revision); + if (!migrate_calendars (calendar_component, major, minor, revision, &err)) { + GNOME_Evolution_Component_UpgradeFailed *failedex; + + failedex = GNOME_Evolution_Component_UpgradeFailed__alloc(); + failedex->what = CORBA_string_dup(_("Failed upgrading calendars.")); + failedex->why = CORBA_string_dup(err->message); + CORBA_exception_set(ev, CORBA_USER_EXCEPTION, ex_GNOME_Evolution_Component_UpgradeFailed, failedex); + } - return CORBA_TRUE; + if (err) + g_error_free(err); } static gboolean |