[PyXMPP] raise and errors in callbacks

roberto juice at lemonacid.com
Wed May 14 12:37:44 CEST 2008

ok i figured i would give it a try.

i have rewritten the xmlextra.endElement() function so that it does not eat 
error propagation. the behaviour results from the extensive use of 'finally' 
statements in error trapping.

please take this WITH CAUTION as i have not fully tested it, however it does 
seem to solve my issues.

i have posted my code on http://pyxmpp.jajcus.net/trac/ticket/14


----- Original Message ----- 
From: roberto
To: Karol Nowak
Cc: pyxmpp at lists.jajcus.net
Sent: Tuesday, May 13, 2008 5:37 PM
Subject: Re: [PyXMPP] raise and errors in callbacks

thank you karol,

it may be related to the same issues i am experiencing then. thank you.

any solution to this? i see it's an open trac of 10 months ago.

----- Original Message ----- 
From: Karol Nowak
To: test
Cc: pyxmpp at lists.jajcus.net
Sent: Tuesday, May 13, 2008 5:21 PM
Subject: Re: [PyXMPP] raise and errors in callbacks


Maybe take a look at this: http://pyxmpp.jajcus.net/trac/ticket/14


On Tue, May 13, 2008 at 4:53 PM, test <juice at lemonacid.com> wrote:


first of all thank you for this great component. i have a very basic noob
question here.

i'm using the echobot.py example, and modified jsut to raise an error when
session starts:

def session_started(self):
       raise TypeError

though, no error is being raised. seems that the raise statement in the
JabberClient callbacks does not produce any results.

furthermore, the same thing is then propagated in all class instances
eventually created under the callbacks, for instance:

def session_started(self):
       dr = DR()


class DR():
       def __init__(self):
               raise TypeError
               print "ok"

raise statement is ignored, and "ok" is not printed.

am i missing something?

thank you,


PyXMPP mailing list
PyXMPP at lists.jajcus.net

Karol 'grzywacz' Nowak

More information about the PyXMPP mailing list