Unhandled Exception in SourcesHandler.cs



Got the following error when adding a google calendar source to
evolution. The attached patch catches the exception and allows the
daemon to keep running.

-Kevin Kubasik

060415 2016537124 08103 Beagle ERROR EX:
System.MissingMethodException: Constructor not found. Class:
Beagle.Daemon.EvolutionDataServerQueryable.CalContainer
060415 2016537124 08103 Beagle ERROR EX: in <0x001c1>
System.Activator:CreateInstance (System.Type type, BindingFlags
bindingAttr, System.Reflection.Binder binder, System.Object[] args,
System.Globalization.CultureInfo culture, System.Object[]
activationAttributes)
060415 2016537124 08103 Beagle ERROR EX: in <0x00024>
System.Activator:CreateInstance (System.Type type, System.Object[]
args, System.Object[] activationAttributes)
060415 2016537124 08103 Beagle ERROR EX: in <0x00020>
System.Activator:CreateInstance (System.Type type, System.Object[]
args)
060415 2016537124 08103 Beagle ERROR EX: in [0x0001e] (at
/home/kevin/src/beagle/beagled/EvolutionDataServerQueryable/SourcesHandler.cs:119)
Beagle.Daemon.EvolutionDataServerQueryable.SourcesHandler:OnSourceAdded
(System.Object o, Evolution.SourceAddedArgs args)
060415 2016537124 08103 Beagle ERROR EX: in (wrapper delegate-invoke)
System.MulticastDelegate:invoke_void_object_SourceAddedArgs
(object,Evolution.SourceAddedArgs)
060415 2016537124 08103 Beagle ERROR EX: in <0x00116>
Evolution.SourceGroup:SourceAddedSignalCallback (IntPtr arg0, IntPtr
arg1, IntPtr gch)
060415 2016537124 08103 Beagle ERROR EX: in (wrapper
native-to-managed) Evolution.SourceGroup:SourceAddedSignalCallback
(intptr,intptr,intptr)
060415 2016537124 08103 Beagle ERROR EX: in <0x00000> <unknown method>
060415 2016537124 08103 Beagle ERROR EX: in (wrapper
managed-to-native) Gtk.Application:gtk_main ()
060415 2016537124 08103 Beagle ERROR EX: in <0x00007> Gtk.Application:Run ()
060415 2016537124 08103 Beagle ERROR EX: in [0x00482] (at
/home/kevin/src/beagle/beagled/BeagleDaemon.cs:430)
Beagle.Daemon.BeagleDaemon:DoMain (System.String[] args)
060415 2016537124 08103 Beagle ERROR EX: in [0x00001] (at
/home/kevin/src/beagle/beagled/BeagleDaemon.cs:216)
Beagle.Daemon.BeagleDaemon:Main (System.String[] args)


--
Cheers,
Kevin Kubasik
http://blog.kubasik.net/
Index: beagled/EvolutionDataServerQueryable/SourcesHandler.cs
===================================================================
RCS file: /cvs/gnome/beagle/beagled/EvolutionDataServerQueryable/SourcesHandler.cs,v
retrieving revision 1.2
diff -u -r1.2 SourcesHandler.cs
--- beagled/EvolutionDataServerQueryable/SourcesHandler.cs	27 Feb 2006 21:36:29 -0000	1.2
+++ beagled/EvolutionDataServerQueryable/SourcesHandler.cs	16 Apr 2006 01:45:30 -0000
@@ -115,11 +115,15 @@
 
 		private void OnSourceAdded (object o, SourceAddedArgs args)
 		{
-			Container cont = (Container) Activator.CreateInstance (this.container_type, new object[] { args.Source, this.fingerprint });
-			if (!cont.OpenClient ())
-				return;
-			cont.IndexAll ();
-			cont.OpenView ();
+			try{
+				Container cont = (Container) Activator.CreateInstance (this.container_type, new object[] { args.Source, this.fingerprint });
+				if (!cont.OpenClient ())
+					return;
+				cont.IndexAll ();
+				cont.OpenView ();
+			}catch(Exception e){
+				Log.Warn(e.Message);
+			}
 		}
 
 		private void OnSourceRemoved (object o, SourceRemovedArgs args)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]