Fixed some code leading to an enchant error.

Sun, 08 Mar 2015 12:05:08 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 08 Mar 2015 12:05:08 +0100
changeset 4161
9eaeac74fd91
parent 4160
44351a724f54
child 4163
9f7ace9e074a

Fixed some code leading to an enchant error.

QScintilla/SpellChecker.py file | annotate | diff | comparison | revisions
--- a/QScintilla/SpellChecker.py	Sat Mar 07 15:49:10 2015 +0100
+++ b/QScintilla/SpellChecker.py	Sun Mar 08 12:05:08 2015 +0100
@@ -525,8 +525,12 @@
                 self.pos = wordEnd
                 if (wordEnd - wordStart) >= self.minimumWordSize and \
                    self.__checkRegion(wordStart):
-                    if spell.check(word):
-                        continue
+                    try:
+                        if spell.check(word):
+                            continue
+                    except enchant.errors.Error:
+                        # ignore these
+                        pass
                     if word in self.__ignoreWords:
                         continue
                     self.word = word

eric ide

mercurial