[orca] Additional debugging to make identifying broken tables easier



commit 93319ddb60c101cf54c0abfc109ae4a8f83958ee
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Nov 24 09:37:15 2015 -0500

    Additional debugging to make identifying broken tables easier

 src/orca/script_utilities.py      |    6 ++++++
 src/orca/structural_navigation.py |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index aea518e..8dce13a 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -981,7 +981,13 @@ class Utilities:
         if role == pyatspi.ROLE_TABLE and attrs.get('layout-guess') != 'true':
             try:
                 table = obj.queryTable()
+            except NotImplementedError:
+                msg = 'ERROR: Table %s does not implement table interface' % obj
+                debug.println(debug.LEVEL_INFO, msg)
+                layoutOnly = True
             except:
+                msg = 'ERROR: Exception querying table interface of %s' % obj
+                debug.println(debug.LEVEL_INFO, msg)
                 layoutOnly = True
             else:
                 if not (table.nRows and table.nColumns):
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index cee5280..8fe85c2 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -781,7 +781,15 @@ class StructuralNavigation:
         table = self.getTableForCell(thisCell)
         try:
             iTable = table.queryTable()
+        except NotImplementedError:
+            msg = 'ERROR: Table %s does not implement table interface' % table
+            debug.println(debug.LEVEL_INFO, msg)
+            iTable = None
         except:
+            msg = 'ERROR: Exception querying table interface of %s' % table
+            debug.println(debug.LEVEL_INFO, msg)
+            iTable = None
+        if not iTable:
             self._script.presentMessage(messages.TABLE_NOT_IN_A)
             return None
 


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