From 76ce5843e375ec6be65fc5e3f537392a13fdb09f Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Thu, 4 Jul 2019 23:43:28 +0300 Subject: [PATCH] - some minor log messages modified to show the exceptions --- flatcamGUI/GUIElements.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/flatcamGUI/GUIElements.py b/flatcamGUI/GUIElements.py index ea306902..18977cdf 100644 --- a/flatcamGUI/GUIElements.py +++ b/flatcamGUI/GUIElements.py @@ -242,9 +242,9 @@ class FloatEntry(QtWidgets.QLineEdit): try: evaled = eval(raw) - except: + except Exception as e: if evaled is not None: - log.error("Could not evaluate: %s" % str(raw)) + log.error("Could not evaluate val: %s, error: %s" % (str(raw), str(e))) return None return float(evaled) @@ -285,9 +285,9 @@ class FloatEntry2(QtWidgets.QLineEdit): evaled = 0.0 try: evaled = eval(raw) - except: + except Exception as e: if evaled is not None: - log.error("Could not evaluate: %s" % str(raw)) + log.error("Could not evaluate val: %s, error: %s" % (str(raw), str(e))) return None return float(evaled) @@ -458,9 +458,9 @@ class EvalEntry(QtWidgets.QLineEdit): evaled = 0.0 try: evaled = eval(raw) - except: + except Exception as e: if evaled is not None: - log.error("Could not evaluate: %s" % str(raw)) + log.error("Could not evaluate val: %s, error: %s" % (str(raw), str(e))) return None return evaled @@ -497,9 +497,9 @@ class EvalEntry2(QtWidgets.QLineEdit): evaled = 0.0 try: evaled = eval(raw) - except: + except Exception as e: if evaled is not None: - log.error("Could not evaluate: %s" % str(raw)) + log.error("Could not evaluate val: %s, error: %s" % (str(raw), str(e))) return None return evaled