Skip to content

Commit

Permalink
gui/explorer: less verbose error dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
sbourdeauducq committed Aug 22, 2015
1 parent 42e87c0 commit 21a28a1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions artiq/gui/explorer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import asyncio
import traceback

from quamash import QtGui, QtCore
from pyqtgraph import dockarea
Expand Down Expand Up @@ -136,12 +135,12 @@ def get_argument_values(self, show_error_message):
for arg, entry in self._args_to_entries.items():
try:
r[arg] = entry.get_argument_value()
except:
except Exception as e:
if show_error_message:
msgbox = QtGui.QMessageBox(self.dialog_parent)
msgbox.setWindowTitle("Error")
msgbox.setText("Failed to obtain value for argument '{}'.\n{}"
.format(arg, traceback.format_exc()))
msgbox.setText("Failed to obtain value for argument '{}':\n{}"
.format(arg, str(e)))
msgbox.setStandardButtons(QtGui.QMessageBox.Ok)
msgbox.show()
return None
Expand Down

0 comments on commit 21a28a1

Please sign in to comment.