kopia lustrzana https://github.com/corrscope/corrscope
Remove unneeded per-method Qt exception handlers
rodzic
7318b1e919
commit
140f2312c7
|
@ -278,15 +278,14 @@ class MainWindow(qw.QMainWindow, Ui_MainWindow):
|
||||||
assert cfg_path.is_file()
|
assert cfg_path.is_file()
|
||||||
self.pref.file_dir = str(cfg_path.parent.resolve())
|
self.pref.file_dir = str(cfg_path.parent.resolve())
|
||||||
|
|
||||||
try:
|
|
||||||
# Raises YAML structural exceptions
|
# Raises YAML structural exceptions
|
||||||
cfg = yaml.load(cfg_path)
|
cfg = yaml.load(cfg_path)
|
||||||
|
|
||||||
|
try:
|
||||||
# Raises color getter exceptions
|
# Raises color getter exceptions
|
||||||
# FIXME if error halfway, clear "file path" and load empty model.
|
|
||||||
self.load_cfg(cfg, cfg_path)
|
self.load_cfg(cfg, cfg_path)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
# FIXME if error halfway, clear "file path" and load empty model.
|
||||||
TracebackDialog(self).showMessage(format_stack_trace(e))
|
TracebackDialog(self).showMessage(format_stack_trace(e))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -452,7 +451,6 @@ class MainWindow(qw.QMainWindow, Ui_MainWindow):
|
||||||
def play_thread(
|
def play_thread(
|
||||||
self, outputs: List[IOutputConfig], dlg: Optional["CorrProgressDialog"]
|
self, outputs: List[IOutputConfig], dlg: Optional["CorrProgressDialog"]
|
||||||
):
|
):
|
||||||
try:
|
|
||||||
assert self.model
|
assert self.model
|
||||||
|
|
||||||
arg = self._get_args(outputs)
|
arg = self._get_args(outputs)
|
||||||
|
@ -473,8 +471,6 @@ class MainWindow(qw.QMainWindow, Ui_MainWindow):
|
||||||
t.error.connect(self.on_play_thread_error)
|
t.error.connect(self.on_play_thread_error)
|
||||||
t.ffmpeg_missing.connect(self.on_play_thread_ffmpeg_missing)
|
t.ffmpeg_missing.connect(self.on_play_thread_ffmpeg_missing)
|
||||||
t.start()
|
t.start()
|
||||||
except Exception as e:
|
|
||||||
TracebackDialog(self).showMessage(format_stack_trace(e))
|
|
||||||
|
|
||||||
def _get_args(self, outputs: List[IOutputConfig]):
|
def _get_args(self, outputs: List[IOutputConfig]):
|
||||||
arg = Arguments(cfg_dir=self.cfg_dir, outputs=outputs)
|
arg = Arguments(cfg_dir=self.cfg_dir, outputs=outputs)
|
||||||
|
|
Ładowanie…
Reference in New Issue