diff src/bridge/bridge_constructor/bridge_constructor.py @ 1062:95758ef3faa8

bridge: async failures are more detailed (full class name + error message)
author souliane <souliane@mailoo.org>
date Sat, 07 Jun 2014 15:20:39 +0200
parents 7e43ea75cce8
children d123d61976c8
line wrap: on
line diff
--- a/src/bridge/bridge_constructor/bridge_constructor.py	Mon Jun 02 19:25:06 2014 +0200
+++ b/src/bridge/bridge_constructor/bridge_constructor.py	Sat Jun 07 15:20:39 2014 +0200
@@ -450,7 +450,7 @@
                 completion['args_result'] = self.getArguments(function['sig_in'], name=arg_doc)
                 completion['async_args'] = 'callback=None, errback=None' if async else ''
                 completion['async_comma'] = ', ' if async and function['sig_in'] else ''
-                completion['async_args_result'] = 'reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])' if async else ''
+                completion['async_args_result'] = 'reply_handler=callback, error_handler=lambda err:errback(dbus_to_bridge_exception(err))' if async else ''
                 result = "self.db_%(category)s_iface.%(name)s(%(args_result)s%(async_comma)s%(async_args_result)s)" % completion
                 completion['result'] = ("unicode(%s)" if self.options.unicode and function['sig_out'] == 's' else "%s") % result
                 methods_part.append("""\