Commit 501864fa authored by augustin_s's avatar augustin_s 🐍
Browse files

use printable_exception

parent 25c6505f
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)
......
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)
......
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)
......
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)
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment