eric6/Debugger/ExceptionLogger.py

branch
multi_processing
changeset 7379
72a72fd56494
parent 7360
9190402e4505
child 7564
787684e6f2f3
--- a/eric6/Debugger/ExceptionLogger.py	Thu Jan 30 19:37:03 2020 +0100
+++ b/eric6/Debugger/ExceptionLogger.py	Sat Feb 01 19:48:21 2020 +0100
@@ -87,25 +87,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 == '':
-            itm.setText(0, "{0}".format(exceptionType))
+        if not exceptionMessage:
+            itm.setText(0, self.tr("{0}: {1}").format(
+                debuggerId, exceptionType))
         else:
-            itm.setText(0, "{0}, {1}".format(exceptionType, exceptionMessage))
+            itm.setText(0, self.tr("{0}: {1}, {2}").format(
+                debuggerId, exceptionType, exceptionMessage))
         
         # now add the call stack, most recent call first
         for entry in stackTrace:

eric ide

mercurial