QScintilla/SpellChecker.py

branch
5_2_x
changeset 2205
2df710446e51
parent 2204
71aa8b87104f
child 2303
0ed4ed026c16
--- a/QScintilla/SpellChecker.py	Fri Nov 09 17:47:22 2012 +0100
+++ b/QScintilla/SpellChecker.py	Fri Nov 09 17:53:56 2012 +0100
@@ -412,12 +412,15 @@
         @param word word to get suggestions for (string)
         @return list of suggestions (list of strings)
         """
+        suggestions = []
         spell = self._spelling_dict
         if spell and len(word) >= self.minimumWordSize:
-            suggestions = spell.suggest(word)
-            return suggestions
-        
-        return []
+            try:
+                suggestions = spell.suggest(word)
+            except enchant.errors.Error:
+                # ignore these
+                pass
+        return suggestions
     
     def add(self, word=None):
         """

eric ide

mercurial