--- a/eric6/Debugger/ExceptionLogger.py Thu Apr 15 16:52:05 2021 +0200 +++ b/eric6/Debugger/ExceptionLogger.py Thu Apr 15 18:11:24 2021 +0200 @@ -7,6 +7,8 @@ Module implementing the Exception Logger widget. """ +import contextlib + from PyQt5.QtCore import pyqtSignal, Qt from PyQt5.QtWidgets import QTreeWidget, QTreeWidgetItem, QMenu @@ -141,11 +143,9 @@ entry = itm.text(0) entryList = entry.split(",") - try: + with contextlib.suppress(IndexError, ValueError): self.sourceFile.emit(entryList[0], int(entryList[1])) - except (IndexError, ValueError): - pass - + def __configure(self): """ Private method to open the configuration dialog.