On Wed, Feb 22, 2012 at 6:36 PM, Gustaf Nilsson <[email protected]> wrote:
> Sorry maybe i was a bit unclear. the problem is not what happens
> server side (which would trigger ontimeout or onerror, but the problem
> is that after the handler receives the return data i do some
> processing on it. it is in this processing that my bug is. its just
> really hard to find it when i dont get any error message whatsoever.
>
> i tried this (which works in "real" python):
>
> onRemoteResponse(x,y):
>    try:
>        do_this_and_that_with_the_return_data_bla_bla()
>    except:
>        import traceback
>        Window.alert(traceback.format_exc())
>
> But it doesnt work.

 hmm, it should.

> having a look in the pyjamas traceback code now
> and it contains:
>
> import sys
>
> def format_exception(etype, value, tb, limit=None):
>    return sys._get_traceback_list(value, tb, limit=limit)
>
> sounds like it might do what i hope, but then what do i pass into it
> as variable????

 hmmm it doesn't ... hmmm..

lkcl@teenymac:~/pyjamas$ find . -name "*.py" | xargs grep _get_traceback_list
./pyjs/src/pyjs/lib/sys.py:def _get_traceback_list(err, tb=None, limit=None):
./pyjs/src/pyjs/lib/sys.py:    return ''.join(_get_traceback_list(err,
tb, limit=limit))
./pyjs/src/pyjs/lib/traceback.py:    return
sys._get_traceback_list(value, tb, limit=limit)
lkcl@teenymac:~/pyjamas$

 keep looking :)

l.

Reply via email to