Debugger/DebugUI.py

branch
jsonrpc
changeset 5136
b1dde2dc14bd
parent 5130
27fe451262bf
child 5140
01484c0afbc6
--- a/Debugger/DebugUI.py	Sat Sep 03 18:42:02 2016 +0200
+++ b/Debugger/DebugUI.py	Sat Sep 03 19:00:12 2016 +0200
@@ -979,7 +979,7 @@
 
         self.debugActGrp.setEnabled(True)
         
-    def __clientExit(self, status):
+    def __clientExit(self, status, message):
         """
         Private method to handle the debugged program terminating.
         
@@ -990,28 +990,38 @@
         self.__resetUI()
         
         if not Preferences.getDebugger("SuppressClientExit") or status != 0:
+            if message:
+                info = self.tr("<p>Message: {0}</p>").format(
+                    Utilities.html_uencode(message))
+            else:
+                info = ""
             if self.ui.currentProg is None:
                 E5MessageBox.information(
                     self.ui, Program,
                     self.tr('<p>The program has terminated with an exit'
-                            ' status of {0}.</p>').format(status))
+                            ' status of {0}.</p>{1}').format(status, info))
             else:
                 E5MessageBox.information(
                     self.ui, Program,
                     self.tr('<p><b>{0}</b> has terminated with an exit'
-                            ' status of {1}.</p>')
+                            ' status of {1}.</p>{2}')
                         .format(Utilities.normabspath(self.ui.currentProg),
-                                status))
+                                status, info))
         else:
+            if message:
+                info = self.tr("Message: {0}").format(
+                    Utilities.html_uencode(message))
+            else:
+                info = ""
             if self.ui.notificationsEnabled():
                 if self.ui.currentProg is None:
                     msg = self.tr('The program has terminated with an exit'
-                                  ' status of {0}.').format(status)
+                                  ' status of {0}.\n{1}').format(status, info)
                 else:
                     msg = self.tr('"{0}" has terminated with an exit'
-                                  ' status of {1}.')\
+                                  ' status of {1}.\n{2}')\
                         .format(os.path.basename(self.ui.currentProg),
-                                status)
+                                status, info)
                 self.ui.showNotification(
                     UI.PixmapCache.getPixmap("debug48.png"),
                     self.tr("Program terminated"), msg)
@@ -1019,13 +1029,13 @@
                 if self.ui.currentProg is None:
                     self.appendStdout.emit(
                         self.tr('The program has terminated with an exit'
-                                ' status of {0}.\n').format(status))
+                                ' status of {0}.\n{1}\n').format(status, info))
                 else:
                     self.appendStdout.emit(
                         self.tr('"{0}" has terminated with an exit'
-                                ' status of {1}.\n')
+                                ' status of {1}.\n{2}\n')
                             .format(Utilities.normabspath(self.ui.currentProg),
-                                    status))
+                                    status, info))
 
     def __clientSyntaxError(self, message, filename, lineNo, characterNo):
         """

eric ide

mercurial