diff --git a/slic/gui/daqpanels/run.py b/slic/gui/daqpanels/run.py index 39521e9d..fcfa4f92 100644 --- a/slic/gui/daqpanels/run.py +++ b/slic/gui/daqpanels/run.py @@ -1,6 +1,6 @@ import wx -from slic.utils import typename +from slic.utils import printable_exception from slic.utils.reprate import get_pvname_reprate from ..widgets import STRETCH, TwoButtons, LabeledMathEntry, LabeledFilenameEntry, make_filled_vbox, post_event @@ -77,8 +77,7 @@ class RunPanel(wx.Panel): try: self.task.wait() except Exception as e: - tn = typename(e) - print(f"{tn}: {e}") + print(printable_exception(e)) self.task = None post_event(wx.EVT_BUTTON, self.btn_go.btn2) diff --git a/slic/gui/daqpanels/scan.py b/slic/gui/daqpanels/scan.py index 78a43551..5f7841d6 100644 --- a/slic/gui/daqpanels/scan.py +++ b/slic/gui/daqpanels/scan.py @@ -1,6 +1,6 @@ import wx -from slic.utils import nice_arange, typename +from slic.utils import nice_arange, printable_exception from slic.utils.reprate import get_pvname_reprate from ..widgets import STRETCH, TwoButtons, LabeledEntry, LabeledMathEntry, LabeledFilenameEntry, make_filled_vbox, make_filled_hbox, post_event @@ -127,8 +127,7 @@ class ScanPanel(wx.Panel): try: self.scan.run() except Exception as e: - tn = typename(e) - print(f"{tn}: {e}") + print(printable_exception(e)) self.scan = None # self.on_change_adj(None) # cannot change widget from thread, post event instead: post_event(wx.EVT_COMBOBOX, self.cb_adjs) diff --git a/slic/gui/daqpanels/special.py b/slic/gui/daqpanels/special.py index e5ab1ba7..d54a0e3b 100644 --- a/slic/gui/daqpanels/special.py +++ b/slic/gui/daqpanels/special.py @@ -1,7 +1,7 @@ import numpy as np import wx -from slic.utils import typename +from slic.utils import printable_exception from slic.utils.reprate import get_pvname_reprate from ..widgets import LabeledMathEntry, LabeledEntry, LabeledFilenameEntry, TwoButtons, make_filled_hbox, make_filled_vbox, STRETCH, EXPANDING @@ -154,8 +154,7 @@ class SpecialScanPanel(wx.Panel): try: self.scan.run() except Exception as e: - tn = typename(e) - print(f"{tn}: {e}") + print(printable_exception(e)) self.scan = None # self.on_change_adj(None) # cannot change widget from thread, post event instead: post_event(wx.EVT_COMBOBOX, self.cb_adjs) diff --git a/slic/gui/daqpanels/static.py b/slic/gui/daqpanels/static.py index 5abfb0c2..742416ed 100644 --- a/slic/gui/daqpanels/static.py +++ b/slic/gui/daqpanels/static.py @@ -1,6 +1,6 @@ import wx -from slic.utils import typename +from slic.utils import printable_exception from slic.utils.reprate import get_pvname_reprate from ..widgets import STRETCH, TwoButtons, LabeledMathEntry, LabeledFilenameEntry, make_filled_vbox, post_event @@ -55,8 +55,7 @@ class StaticPanel(wx.Panel): try: self.task.wait() except Exception as e: - tn = typename(e) - print(f"{tn}: {e}") + print(printable_exception(e)) self.task = None post_event(wx.EVT_BUTTON, self.btn_go.btn2) diff --git a/slic/gui/daqpanels/tweak.py b/slic/gui/daqpanels/tweak.py index 92768d18..8158f11d 100644 --- a/slic/gui/daqpanels/tweak.py +++ b/slic/gui/daqpanels/tweak.py @@ -2,7 +2,7 @@ from collections import defaultdict from datetime import datetime import wx -from slic.utils import typename +from slic.utils import printable_exception from ..widgets import EXPANDING, TwoButtons, LabeledTweakEntry, LabeledMathEntry, make_filled_vbox, post_event, AutoWidthListCtrl, copy_to_clipboard from ..widgets.plotting import PlotDialog @@ -107,8 +107,7 @@ class TweakPanel(wx.Panel): try: self.task.wait() except Exception as e: - tn = typename(e) - print(f"{tn}: {e}") + print(printable_exception(e)) self.task = None # self.on_change_adj(None) # cannot change widget from thread, post event instead: post_event(wx.EVT_COMBOBOX, self.cb_adjs)