eric6/Debugger/ExceptionLogger.py

branch
maintenance
changeset 8043
0acf98cd089a
parent 7924
8a96736d465e
parent 7923
91e843545d9a
child 8176
31965986ecd1
diff -r 866adc8c315b -r 0acf98cd089a eric6/Debugger/ExceptionLogger.py
--- a/eric6/Debugger/ExceptionLogger.py	Sun Jan 17 13:53:08 2021 +0100
+++ b/eric6/Debugger/ExceptionLogger.py	Mon Feb 01 10:38:16 2021 +0100
@@ -86,25 +86,34 @@
         else:
             self.menu.popup(coord)
             
-    def addException(self, exceptionType, exceptionMessage, stackTrace):
+    def addException(self, exceptionType, exceptionMessage, stackTrace,
+                     debuggerId):
         """
         Public slot to handle the arrival of a new exception.
         
-        @param exceptionType type of exception raised (string)
-        @param exceptionMessage message given by the exception (string)
-        @param stackTrace list of stack entries.
+        @param exceptionType type of exception raised
+        @type str
+        @param exceptionMessage message given by the exception
+        @type str
+        @param stackTrace list of stack entries
+        @type list
+        @param debuggerId ID of the debugger backend
+        @type str
         """
         itm = QTreeWidgetItem(self)
         if exceptionType is None:
             itm.setText(
-                0, self.tr('An unhandled exception occured.'
-                           ' See the shell window for details.'))
+                0, self.tr('{0}: An unhandled exception occured.'
+                           ' See the shell window for details.')
+                .format(debuggerId))
             return
         
-        if exceptionMessage == '':
-            text = "{0}".format(exceptionType)
+        if not exceptionMessage:
+            text = self.tr("{0}: {1}").format(
+                debuggerId, exceptionType)
         else:
-            text = "{0}, {1}".format(exceptionType, exceptionMessage)
+            text = self.tr("{0}: {1}, {2}").format(
+                debuggerId, exceptionType, exceptionMessage)
         
         itm.setText(0, text)
         itm.setToolTip(0, text)

eric ide

mercurial