Im really not sure where to go from here. (un)fortunately i managed to
crush the bug i had a problem with. i knew exactly what line it was,
stared at it for hours and just realised that ret[data] should be
ret["data"] LOL someone call 112 before i stab myself

still think it would be useful to get traceback from these handlers. I
just really have no idea what piece of code it is that deals with
recieving the data and calling the handler (with a try:?)

G

On Wed, Feb 22, 2012 at 6:48 PM, lkcl luke <[email protected]> wrote:
> 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