[orca] Try to handle object events for newly-defunct objects more gracefully



commit f0c3194b69bf25455bcfda26c86c7d71782a709b
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Jun 5 13:18:11 2015 -0400

    Try to handle object events for newly-defunct objects more gracefully
    
    Orca no longer queues or processes events for objects which are defunct
    at the time we receive the event. But objects can go defunct in between
    the time we queue them and process them.

 src/orca/event_manager.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index eb31346..4e29d0f 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -606,7 +606,11 @@ class EventManager:
             app = event.host_application or event.source.getApplication()
             _scriptManager.setActiveScript(script, reason)
 
-        script.processObjectEvent(event)
+        try:
+            script.processObjectEvent(event)
+        except:
+            msg = 'ERROR: Could not process %s' % event.type
+            debug.println(debug.LEVEL_INFO, msg)
 
     def processKeyboardEvent(self, keyboardEvent):
         """Processes the given keyboard event based on the keybinding from the


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