From c6da2725e05030af92353147a37a5f559e5f3a42 Mon Sep 17 00:00:00 2001 From: Eskil Heyn Olsen Date: Wed, 15 Sep 1999 14:02:57 +0000 Subject: fixed the exception throwing. The conduit can now actually insert entries in the gnomecal. svn path=/trunk/; revision=1230 --- calendar/gui/corba-cal.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/corba-cal.c b/calendar/gui/corba-cal.c index 6b4566dc06..787c913418 100644 --- a/calendar/gui/corba-cal.c +++ b/calendar/gui/corba-cal.c @@ -55,11 +55,14 @@ cal_repo_get_object (PortableServer_Servant servant, obj = calendar_object_find_event (gcal->cal, uid); if (obj == NULL){ + GNOME_Calendar_Repository_NotFound *exn; + + exn = GNOME_Calendar_Repository_NotFound__alloc(); CORBA_exception_set ( ev, CORBA_USER_EXCEPTION, ex_GNOME_Calendar_Repository_NotFound, - ""); + exn); return NULL; } @@ -80,11 +83,17 @@ cal_repo_get_object_by_pilot_id (PortableServer_Servant servant, char *buffer; CORBA_char *ret; + g_message("entering cal_repo_get_object_by_pilot_id\n"); + obj = calendar_object_find_by_pilot (gcal->cal, pilot_id); if (obj == NULL){ + GNOME_Calendar_Repository_NotFound *exn; + + exn = GNOME_Calendar_Repository_NotFound__alloc(); CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_GNOME_Calendar_Repository_NotFound, NULL); + ex_GNOME_Calendar_Repository_NotFound, exn); + g_message("leaving cal_repo_get_object_by_pilot_id the hard way\n"); return NULL; } @@ -92,6 +101,8 @@ cal_repo_get_object_by_pilot_id (PortableServer_Servant servant, ret = CORBA_string_dup (buffer); free (buffer); + g_message("leaving cal_repo_get_object_by_pilot_id\n"); + return ret; } @@ -106,9 +117,12 @@ cal_repo_get_id_from_pilot_id (PortableServer_Servant servant, obj = calendar_object_find_by_pilot (gcal->cal, pilot_id); if (obj == NULL){ + GNOME_Calendar_Repository_NotFound *exn; + + exn = GNOME_Calendar_Repository_NotFound__alloc(); CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_GNOME_Calendar_Repository_NotFound, NULL); + ex_GNOME_Calendar_Repository_NotFound, exn); return NULL; } @@ -125,9 +139,12 @@ cal_repo_delete_object (PortableServer_Servant servant, obj = calendar_object_find_event (gcal->cal, uid); if (obj == NULL){ + GNOME_Calendar_Repository_NotFound *exn; + + exn = GNOME_Calendar_Repository_NotFound__alloc(); CORBA_exception_set (ev, CORBA_USER_EXCEPTION, - ex_GNOME_Calendar_Repository_NotFound, NULL); + ex_GNOME_Calendar_Repository_NotFound, exn); return; } @@ -166,11 +183,14 @@ cal_repo_update_pilot_id (PortableServer_Servant servant, obj = calendar_object_find_event (gcal->cal, uid); if (obj == NULL){ + GNOME_Calendar_Repository_NotFound *exn; + + exn = GNOME_Calendar_Repository_NotFound__alloc(); CORBA_exception_set ( ev, CORBA_USER_EXCEPTION, ex_GNOME_Calendar_Repository_NotFound, - ""); + exn); return; } -- cgit