From: Wido D. <wid...@gm...> - 2005-09-20 05:03:32
|
On 9/19/05, Mark Roach <mr...@ok...> wrote: > On Thu, Sep 15, 2005 at 04:41:45PM +0200, Wido Depping wrote: > > Hi All, > > I've run accross a strange behaviour with simple_bind(). Instead of > > throwing exceptions when a bind wasn't succesful, it returns an > > integer. 4 for failure and 5 for success. Unfortunately I was assuming > > that this function would raise an exception. simple_bind_s() however > > behaves 'correctly'. Is this behaviour correct or a bug? >=20 > simple_bind is asynchronous, meaning that you need to take the number it > returns and pass it to result(). That's when it will raise the exception > The reason it works with the _s version of the function is that all the > _s functions are synchronous, i.e. they are the same as calling > c.result(c.function(params...)). Depending on the way your app is > architected, either one may be apropriate. Argh, shame on me. Somehow this was too obvious. I was distracted because of the unbind()/unbind_s() functions, where it's stated in the docs, that they are both synchronous ^^ mfg. Wido --=20 Wido Depping ICQ: 51303067 AIM: wido3379 Jabber: wi...@ja... |