Added check for non-alphabetic words
[getaclue.git] / crosswordpuzzlecreator.py
index 334895d..baeccc5 100644 (file)
@@ -235,6 +235,8 @@ class CrosswordPuzzleCreator:
                        sys.stderr.write ("Word intersects badly with another word!\n")
                except crosswordpuzzle.FrozenGridException:
                        sys.stderr.write ("Word cannot be added to a frozen puzzle.\n")
+               except crosswordpuzzle.WordCharsException:
+                       sys.stderr.write ("Non-word characters in word. Cannot add.\n")
 
        # Export to image/HTML
        def on_export_image (self, solution=True):