Jay, Dylan writes:
... no stack trace in faulte XML-RPC responses ...
Is this a bug, yes or no? Strictly speaking, it is not a bug (because no one promisses this feature).
However, I started to work with XML-RPC recently and got annoyed by the difficulty to analyse problems. I patched "ZPublisher.xmlrpc" to send tracebacks with the response. Patch attached. Dieter --- xmlrpc.py~ Wed Jan 9 18:51:57 2002 +++ xmlrpc.py Fri Aug 30 16:51:10 2002 @@ -122,15 +122,29 @@ # Create an appropriate Fault object. Unfortunately, we throw away # most of the debugging information. More useful error reporting is # left as an exercise for the reader. + + # DM + # we include now a compact traceback, if possible + def _compactTb(tb): + '''return a compact traceback (or '').''' + if tb is None: return '' + info= [] + while tb: + f= tb.tb_frame.f_code + info.append((f.co_filename,f.co_name,str(tb.tb_lineno))) + tb= tb.tb_next + return '|'.join(map(':'.join,info)) + tb= tb and _compactTb(tb) or '' + Fault=xmlrpclib.Fault f=None try: if isinstance(v, Fault): f=v elif isinstance(v, Exception): - f=Fault(-1, "Unexpected Zope exception: " + str(v)) + f=Fault(-1, "Unexpected Zope exception: %s: %s [%s]" % (str(t), str(v),tb)) else: - f=Fault(-2, "Unexpected Zope error value: " + str(v)) + f=Fault(-2, "Unexpected Zope error value: %s: %s [%s]" % (str(t),str(v),tb)) except: f=Fault(-3, "Unknown Zope fault type")