Author: pjohanson
Date: 2005-09-23 19:17:35 -0400 (Fri, 23 Sep 2005)
New Revision: 50649

Modified:
   trunk/monodevelop/Extras/BooBinding/ChangeLog
   trunk/monodevelop/Extras/BooBinding/Gui/BooShellModel.boo
Log:
Wrap access to remote process object in try/except to avoid nasty remoting 
exception. Not really a fix.


Modified: trunk/monodevelop/Extras/BooBinding/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/BooBinding/ChangeLog       2005-09-23 23:15:50 UTC 
(rev 50648)
+++ trunk/monodevelop/Extras/BooBinding/ChangeLog       2005-09-23 23:17:35 UTC 
(rev 50649)
@@ -1,3 +1,8 @@
+2005-09-23  Peter Johanson  <[EMAIL PROTECTED]> 
+
+       * Gui/BooShellModel.boo: Wrap all access to remote process object in
+       try/except to handle nasty remoting exception. Not really a fix.
+
 2005-08-29  Peter Johanson  <[EMAIL PROTECTED]> 
 
        * Parser/Visitor.boo: Fix line number off-by-one error.

Modified: trunk/monodevelop/Extras/BooBinding/Gui/BooShellModel.boo
===================================================================
--- trunk/monodevelop/Extras/BooBinding/Gui/BooShellModel.boo   2005-09-23 
23:15:50 UTC (rev 50648)
+++ trunk/monodevelop/Extras/BooBinding/Gui/BooShellModel.boo   2005-09-23 
23:17:35 UTC (rev 50649)
@@ -63,11 +63,19 @@
        
        References as IList:
                get:    
-                       return _booShell.References
+                       refs as IList
+                       try:
+                               refs = _booShell.References
+                       except:
+                               pass
+                       return refs
        
        def constructor():
                getRemoteShellObject()
-               _booShell.Run ()
+               try:
+                       _booShell.Run ()
+               except:
+                       pass
 
        private def getRemoteShellObject ():
                _procService as ProcessService = ServiceManager.GetService 
(typeof (ProcessService))
@@ -76,11 +84,17 @@
                        raise Exception ("Unable to instantiate remote BooShell 
object")
        
        def Reset () as bool:
-               _booShell.Reset()
+               try:
+                       _booShell.Reset()
+               except:
+                       return false
                return true
        
        def LoadAssembly (assemblyPath as string) as bool:
-               _booShell.LoadAssembly (assemblyPath)
+               try:
+                       _booShell.LoadAssembly (assemblyPath)
+               except:
+                       return false
                return true
        
        def GetOutput () as (string):
@@ -114,8 +128,11 @@
 
 
                                if com is not null:
-                                       _booShell.QueueInput (com)
-                                       lines = _booShell.GetOutput ()
+                                       try:
+                                               _booShell.QueueInput (com)
+                                               lines = _booShell.GetOutput ()
+                                       except:
+                                               pass
                                        if lines is not null:
                                                EnqueueOutput (lines)
                                        com = null
@@ -141,7 +158,10 @@
        
        def Dispose ():
                _thread.Abort ()
-               _booShell.Dispose ()
+               try:
+                       _booShell.Dispose ()
+               except:
+                       pass
                
        def print (obj):
                lock _outputQueue:

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to