Log coloring problems
@@ -14,7 +14,7 @@ In Shell only current command entry is colored
Regexes are adapted from idlelib
"""
-
+import logging
import re
import tkinter
@@ -22,6 +22,8 @@ from thonny import get_workbench
from thonny.codeview import CodeViewText
from thonny.shell import ShellText
+logger = logging.getLogger(__name__)
+
TODO = "COLOR_TODO"
@@ -308,7 +310,10 @@ def update_coloring_on_event(event):
else:
text = event.widget
+ try:
update_coloring_on_text(text, event)
+ except Exception as e:
+ logger.error("Problem with coloring", exc_info=e)
def update_coloring_on_text(text, event=None):
