Remove unneeded per-method Qt exception handlers

pull/357/head
nyanpasu64 2019-04-19 10:40:38 -07:00
rodzic 7318b1e919
commit 140f2312c7
1 zmienionych plików z 21 dodań i 25 usunięć

Wyświetl plik

@ -278,15 +278,14 @@ class MainWindow(qw.QMainWindow, Ui_MainWindow):
assert cfg_path.is_file()
self.pref.file_dir = str(cfg_path.parent.resolve())
try:
# Raises YAML structural exceptions
cfg = yaml.load(cfg_path)
try:
# Raises color getter exceptions
# FIXME if error halfway, clear "file path" and load empty model.
self.load_cfg(cfg, cfg_path)
except Exception as e:
# FIXME if error halfway, clear "file path" and load empty model.
TracebackDialog(self).showMessage(format_stack_trace(e))
return
@ -452,7 +451,6 @@ class MainWindow(qw.QMainWindow, Ui_MainWindow):
def play_thread(
self, outputs: List[IOutputConfig], dlg: Optional["CorrProgressDialog"]
):
try:
assert self.model
arg = self._get_args(outputs)
@ -473,8 +471,6 @@ class MainWindow(qw.QMainWindow, Ui_MainWindow):
t.error.connect(self.on_play_thread_error)
t.ffmpeg_missing.connect(self.on_play_thread_ffmpeg_missing)
t.start()
except Exception as e:
TracebackDialog(self).showMessage(format_stack_trace(e))
def _get_args(self, outputs: List[IOutputConfig]):
arg = Arguments(cfg_dir=self.cfg_dir, outputs=outputs)