commit bfa670d4ef902c305f38c0f9589d9eba82f7cfaf
parent 3910b9d9c3b0c2c0c4de9c50ee54854e770d214b
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date: Fri, 31 Jul 2020 03:31:32 +0200
wfd-source: Print call trace on error
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/test/wfd-source b/test/wfd-source
@@ -15,6 +15,7 @@ import collections
import collections.abc
import random
import dataclasses
+import traceback
import gi
gi.require_version('GLib', '2.0')
@@ -1139,8 +1140,13 @@ class WFDSource(Gtk.Window):
def on_rtsp_error(excp):
self.disconnect_peer(dev_path, path)
+ tb = ''
+ try:
+ tb = '\n\nDebug info: ' + traceback.format_exc()
+ except:
+ pass
dialog = Gtk.MessageDialog(parent=self, message_type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.OK, text='Negotiation failed')
- dialog.format_secondary_text('RTSP error when talking to ' + self.objects[path][PEER_IF]['Name'] + ': ' + repr(excp))
+ dialog.format_secondary_text('RTSP error when talking to ' + self.objects[path][PEER_IF]['Name'] + ': ' + repr(excp) + tb)
dialog.show()
def on_ok(response, *args):