Skip to content
Snippets Groups Projects
Commit a6fba8e9 authored by Conor Finn's avatar Conor Finn
Browse files

RE #28108 Simplify exception handling

parent 79c502f9
No related branches found
No related tags found
No related merge requests found
...@@ -131,15 +131,9 @@ class MainWindow(QMainWindow): ...@@ -131,15 +131,9 @@ class MainWindow(QMainWindow):
self.ui.convertedVal.clear() self.ui.convertedVal.clear()
self.ui.convertedVal.insert(str(self.output)) self.ui.convertedVal.insert(str(self.output))
except UnboundLocalError as ule: except (UnboundLocalError, ArithmeticError, ValueError, RuntimeError) as err:
QMessageBox.warning(self, "TofConverter", str(ule)) QMessageBox.warning(self, "TofConverter", str(err))
return return
except ArithmeticError as ae: except Exception as exc:
QMessageBox.warning(self, "TofConverter", str(ae)) Logger.error(exc)
return
except ValueError as ve:
QMessageBox.warning(self, "TofConverter", str(ve))
return
except RuntimeError as re:
QMessageBox.warning(self, "TofConverter", str(re))
return return
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment