use printable_exception
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user